summaryrefslogtreecommitdiff
path: root/src/gui/gui-action.c
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2005-10-30 22:56:00 +0000
committerSebastien Helleu <flashcode@flashtux.org>2005-10-30 22:56:00 +0000
commit6b6def589072d0de669b096c802435c08b7f870b (patch)
tree6ef02a6f0e1317c16ecacbc52027615f01972cc6 /src/gui/gui-action.c
parentbe1c9be9258f182efde9f5ded5c85f016c87274c (diff)
downloadweechat-6b6def589072d0de669b096c802435c08b7f870b.zip
Fixed "jump to next server" action (was broken by new option "look_one_server_buffer")
Diffstat (limited to 'src/gui/gui-action.c')
-rw-r--r--src/gui/gui-action.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/gui/gui-action.c b/src/gui/gui-action.c
index 69e4f3a7a..d12d42ab6 100644
--- a/src/gui/gui-action.c
+++ b/src/gui/gui-action.c
@@ -998,15 +998,17 @@ gui_action_jump_next_server (t_gui_window *window)
if (ptr_server != SERVER(window->buffer))
{
/* save current buffer */
- SERVER(window->buffer)->buffer->old_channel_buffer =
- window->buffer;
+ SERVER(window->buffer)->saved_buffer = window->buffer;
/* come back to memorized chan if found */
- if (ptr_server->buffer->old_channel_buffer)
- ptr_buffer = ptr_server->buffer->old_channel_buffer;
+ if (ptr_server->saved_buffer)
+ ptr_buffer = ptr_server->saved_buffer;
else
ptr_buffer = (ptr_server->channels) ?
ptr_server->channels->buffer : ptr_server->buffer;
+ if ((ptr_server->buffer == ptr_buffer)
+ && (ptr_buffer->all_servers))
+ ptr_buffer->server = ptr_server;
gui_switch_to_buffer (window, ptr_buffer);
gui_redraw_buffer (window->buffer);
}