diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2009-04-21 17:48:44 +0200 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2009-04-21 17:48:44 +0200 |
commit | 890b2ed23a1311c9051cceb1675b9bb27cf45c70 (patch) | |
tree | 1a23dd3b00a3e026f63b6cfa17be393f2e243b64 /src/gui/gui-buffer.c | |
parent | 7bed0ec48541eda79384fda9275769692846be91 (diff) | |
download | weechat-890b2ed23a1311c9051cceb1675b9bb27cf45c70.zip |
Add new option weechat.look.jump_current_to_previous_buffer
Diffstat (limited to 'src/gui/gui-buffer.c')
-rw-r--r-- | src/gui/gui-buffer.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/gui/gui-buffer.c b/src/gui/gui-buffer.c index c93818ff2..68cd3bac5 100644 --- a/src/gui/gui-buffer.c +++ b/src/gui/gui-buffer.c @@ -1380,8 +1380,16 @@ gui_buffer_switch_by_number (struct t_gui_window *window, int number) return; /* buffer is currently displayed ? then jump to previous buffer */ - if ((number == window->buffer->number) && gui_previous_buffer) - number = gui_previous_buffer->number; + if (number == window->buffer->number) + { + if (CONFIG_BOOLEAN(config_look_jump_current_to_previous_buffer) + && gui_previous_buffer) + { + number = gui_previous_buffer->number; + } + else + return; + } /* search for buffer in the list */ for (ptr_buffer = gui_buffers; ptr_buffer; ptr_buffer = ptr_buffer->next_buffer) |