This seems to fix the bug for me:
``` diff --git a/src/sidebar.c b/src/sidebar.c index 9d004f392..f1d722ab6 100644 --- a/src/sidebar.c +++ b/src/sidebar.c @@ -1652,7 +1652,7 @@ void sidebar_focus_symbols_tab(void) GtkWidget *symbol_list_scrollwin = gtk_notebook_get_nth_page(notebook, TREEVIEW_SYMBOL);
gtk_notebook_set_current_page(notebook, TREEVIEW_SYMBOL); - gtk_widget_grab_focus(gtk_bin_get_child(GTK_BIN(symbol_list_scrollwin))); + gtk_widget_grab_focus(ui_lookup_widget(main_widgets.window, "treeview2");); } } ```
However, I feel like adding `GtkWidget *tree_symbols;` to `struct SidebarTreeviews` would be cleaner. One could then use `gtk_widget_grab_focus(tv.tree_symbols);` in `sidebar_focus_symbols_tab()`. I have no idea where `tv.tree_symbols = ui_lookup_widget(main_widgets.window, "treeview2");` should be done. In `prepare_openfiles()`, at the same time as `tree_openfiles` ? Sorry, if what I say makes no sense, that the first time I look into Geany's code.