1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-08 02:33:12 +02:00

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.
This commit is contained in:
Nils Görs
2012-07-07 13:41:16 +02:00
committed by Sebastien Helleu
parent 97a64f1334
commit 92aa9bff45
19 changed files with 84 additions and 15 deletions
+6
View File
@@ -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",
+1
View File
@@ -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;
+10 -3
View File
@@ -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;
}
}