Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Always show the completion group name when navigate in the group #46

Merged
merged 2 commits into from
Aug 18, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions girara/completion.c
Original file line number Diff line number Diff line change
Expand Up @@ -423,12 +423,17 @@ bool girara_isc_completion(girara_session_t* session, girara_argument_t* argumen
unsigned int current_item = g_list_position(entries, entries_current);

GList* tmpentry = entries;
girara_internal_completion_entry_t *tmp;
for (unsigned int i = 0; i < n_elements; i++) {
tmp = (girara_internal_completion_entry_t*)tmpentry->data;
if ((i >= (current_item - lh) && (i <= current_item + uh)) || (i < n_completion_items && current_item < lh) ||
(i >= (n_elements - n_completion_items) && (current_item >= (n_elements - uh)))) {
gtk_widget_show(GTK_WIDGET(((girara_internal_completion_entry_t*)tmpentry->data)->widget));
gtk_widget_show(GTK_WIDGET(tmp->widget));
} else {
gtk_widget_hide(GTK_WIDGET(((girara_internal_completion_entry_t*)tmpentry->data)->widget));
if (!tmp->group){
laomuon marked this conversation as resolved.
Show resolved Hide resolved

gtk_widget_hide(GTK_WIDGET(tmp->widget));
}
}

tmpentry = g_list_next(tmpentry);
Expand Down