diff --git a/ChangeLog.adoc b/ChangeLog.adoc index 0f6636078..a8c0bdd65 100644 --- a/ChangeLog.adoc +++ b/ChangeLog.adoc @@ -57,6 +57,7 @@ Bug fixes:: * core: ignore incomplete ctrl/meta/meta2 codes in keys * core: fix display glitch in command errors when a wide char is set in option weechat.look.command_chars (issue #1871) * core: fix update of terminal title in some terminals like suckless terminal (stterm) (issue #1882) + * core: fix infinite loop on startup when running some gui commands before the switch to core buffer is performed (issue #1917) * api: readjust string size in function string_dyn_free when string is not freed * buflist: do not display keys added in default context on first load * fset: remove scroll to top of fset buffer when options are added or removed (issue #1892) diff --git a/src/gui/curses/gui-curses-main.c b/src/gui/curses/gui-curses-main.c index 7b024717c..1f1c5b15d 100644 --- a/src/gui/curses/gui-curses-main.c +++ b/src/gui/curses/gui-curses-main.c @@ -163,8 +163,6 @@ void gui_main_init () { struct t_gui_buffer *ptr_buffer; - struct t_gui_bar *ptr_bar; - struct t_gui_bar_window *ptr_bar_win; char title[256]; /* allow ctrl-c to quit WeeChat in headless mode */ @@ -238,24 +236,8 @@ gui_main_init () } } - /* - * create bar windows for root bars (they were read from config, - * but no window was created, GUI was not initialized) - */ - for (ptr_bar = gui_bars; ptr_bar; ptr_bar = ptr_bar->next_bar) - { - if ((CONFIG_INTEGER(ptr_bar->options[GUI_BAR_OPTION_TYPE]) == GUI_BAR_TYPE_ROOT) - && (!ptr_bar->bar_window)) - { - gui_bar_window_new (ptr_bar, NULL); - } - } - for (ptr_bar_win = gui_windows->bar_windows; - ptr_bar_win; ptr_bar_win = ptr_bar_win->next_bar_window) - { - gui_bar_window_calculate_pos_size (ptr_bar_win, gui_windows); - gui_bar_window_create_win (ptr_bar_win); - } + /* switch to buffer */ + gui_window_switch_to_buffer (gui_current_window, ptr_buffer, 0); } if (CONFIG_BOOLEAN(config_look_mouse))