Skip to content

Commit

Permalink
fix: Always show the completion group name when navigate in the group
Browse files Browse the repository at this point in the history
  • Loading branch information
laomuon committed Aug 12, 2024
1 parent 6c1e546 commit 19c119c
Showing 1 changed file with 7 additions and 2 deletions.
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){

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

tmpentry = g_list_next(tmpentry);
Expand Down

0 comments on commit 19c119c

Please sign in to comment.