diff options
author | Nils Görs <weechatter@arcor.de> | 2012-07-07 13:41:16 +0200 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2012-07-07 13:41:16 +0200 |
commit | 92aa9bff4588068974857d175490c39f77cfec6f (patch) | |
tree | 5039ec6f7630f7ca9483f63477856caf8b0bcd8e /src | |
parent | 97a64f1334d567c6d332416ad42c4d8b8ffac7b0 (diff) | |
download | weechat-92aa9bff4588068974857d175490c39f77cfec6f.zip |
core: add option weechat.look.jump_smart_back_to_buffer (jump back to initial buffer after reaching end of hotlist)
The option is "on" by default, which is old behaviour.
Diffstat (limited to 'src')
-rw-r--r-- | src/core/wee-config.c | 6 | ||||
-rw-r--r-- | src/core/wee-config.h | 1 | ||||
-rw-r--r-- | src/gui/gui-input.c | 13 |
3 files changed, 17 insertions, 3 deletions
diff --git a/src/core/wee-config.c b/src/core/wee-config.c index 94ace91cd..cccdcca36 100644 --- a/src/core/wee-config.c +++ b/src/core/wee-config.c @@ -123,6 +123,7 @@ struct t_config_option *config_look_item_time_format; struct t_config_option *config_look_item_buffer_filter; struct t_config_option *config_look_jump_current_to_previous_buffer; struct t_config_option *config_look_jump_previous_buffer_when_closing; +struct t_config_option *config_look_jump_smart_back_to_buffer; struct t_config_option *config_look_mouse; struct t_config_option *config_look_mouse_timer_delay; struct t_config_option *config_look_nickmode; @@ -2029,6 +2030,11 @@ config_weechat_init_options () N_("jump to previously visited buffer when closing a buffer (if " "disabled, then jump to buffer number - 1)"), NULL, 0, 0, "on", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL); + config_look_jump_smart_back_to_buffer = config_file_new_option ( + weechat_config_file, ptr_section, + "jump_smart_back_to_buffer", "boolean", + N_("jump back to initial buffer after reaching end of hotlist"), + NULL, 0, 0, "on", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL); config_look_mouse = config_file_new_option ( weechat_config_file, ptr_section, "mouse", "boolean", diff --git a/src/core/wee-config.h b/src/core/wee-config.h index 738ddeb2b..53ee5f6fc 100644 --- a/src/core/wee-config.h +++ b/src/core/wee-config.h @@ -146,6 +146,7 @@ extern struct t_config_option *config_look_item_time_format; extern struct t_config_option *config_look_item_buffer_filter; extern struct t_config_option *config_look_jump_current_to_previous_buffer; extern struct t_config_option *config_look_jump_previous_buffer_when_closing; +extern struct t_config_option *config_look_jump_smart_back_to_buffer; extern struct t_config_option *config_look_mouse; extern struct t_config_option *config_look_mouse_timer_delay; extern struct t_config_option *config_look_nickmode; diff --git a/src/gui/gui-input.c b/src/gui/gui-input.c index 7c3d205c6..cd430d55b 100644 --- a/src/gui/gui-input.c +++ b/src/gui/gui-input.c @@ -1264,9 +1264,16 @@ gui_input_jump_smart (struct t_gui_buffer *buffer) { if (gui_hotlist_initial_buffer) { - gui_window_switch_to_buffer (window, - gui_hotlist_initial_buffer, 1); - gui_window_scroll_bottom (window); + if (CONFIG_BOOLEAN(config_look_jump_smart_back_to_buffer)) + { + gui_window_switch_to_buffer (window, + gui_hotlist_initial_buffer, 1); + gui_window_scroll_bottom (window); + } + gui_hotlist_initial_buffer = NULL; + } + else + { gui_hotlist_initial_buffer = NULL; } } |