summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2013-11-28 19:59:36 +0100
committerSebastien Helleu <flashcode@flashtux.org>2013-11-28 19:59:36 +0100
commit7e14c60f4dcba0dcae5418bc93bb0a0e497e6bb1 (patch)
tree5b62bd74b4608167b666472cc8baf3d68d5e2f29
parent02fc4053c903a2d4b671f1b85b05f90a4d891612 (diff)
downloadweechat-7e14c60f4dcba0dcae5418bc93bb0a0e497e6bb1.zip
core: revert check of layout when switching to a buffer using value "auto" in buffer_set
This reverts commits 14cf7bd20fb3f00b18343464c175a0c4e3556149 and 262dff4b87ebf14a11fe83899fe168bc5a72ffe6. The initial fix was for a problem with irc autojoin and layout: the current window has not appropriate buffer (as defined in layout) if it is not the latest channel in "autojoin" option. So the way to fix this problem is to set the value of option irc.look.buffer_switch_autojoin to off.
-rw-r--r--ChangeLog2
-rw-r--r--doc/en/weechat_plugin_api.en.txt3
-rw-r--r--doc/fr/weechat_plugin_api.fr.txt5
-rw-r--r--doc/it/weechat_plugin_api.it.txt5
-rw-r--r--src/gui/gui-buffer.c19
5 files changed, 11 insertions, 23 deletions
diff --git a/ChangeLog b/ChangeLog
index 5cdc3af97..d768e3f58 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -28,8 +28,6 @@ http://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes]
* core: add default keys `meta2-1;3H` / `meta2-1;3F` (alt+home/end) and
`meta2-23;3~` / `meta2-24;3~` (alt+F11/F12) for xterm
* core: add support of italic text (requires ncurses >= 5.9 patch 20130831)
-* core: fix auto-apply of window layout in current window when option
- irc.look.buffer_switch_autojoin is on
* core: fix bind of keys in cursor/mouse context when key starts with "@"
(remove the warning about unsafe key)
* core: fix truncated prefix when filters are toggled (bug #40204)
diff --git a/doc/en/weechat_plugin_api.en.txt b/doc/en/weechat_plugin_api.en.txt
index b7d54da41..44cb99a53 100644
--- a/doc/en/weechat_plugin_api.en.txt
+++ b/doc/en/weechat_plugin_api.en.txt
@@ -10081,8 +10081,7 @@ Arguments:
| display | "1", "auto" |
"1": switch to this buffer in current window +
- "auto": switch to this buffer in current window only if the buffer
- displayed is not the buffer set in the layout, read marker is not reset
+ "auto": switch to this buffer in current window, read marker is not reset
| number | number |
Move buffer to this number
diff --git a/doc/fr/weechat_plugin_api.fr.txt b/doc/fr/weechat_plugin_api.fr.txt
index c28e46353..4e825b643 100644
--- a/doc/fr/weechat_plugin_api.fr.txt
+++ b/doc/fr/weechat_plugin_api.fr.txt
@@ -10254,9 +10254,8 @@ Paramètres :
| display | "1", "auto" |
"1" : basculer vers ce tampon dans la fenêtre active +
- "auto" : basculer vers ce tampon dans la fenêtre active seulement si le
- tampon affiché n'est pas celui défini dans le "layout", le marqueur de données
- non lues n'est pas réinitialisé
+ "auto" : basculer vers ce tampon dans la fenêtre active, le marqueur de
+ données non lues n'est pas réinitialisé
| number | numéro |
Déplace le tampon vers ce numéro
diff --git a/doc/it/weechat_plugin_api.it.txt b/doc/it/weechat_plugin_api.it.txt
index a5ff183c5..c083b5e45 100644
--- a/doc/it/weechat_plugin_api.it.txt
+++ b/doc/it/weechat_plugin_api.it.txt
@@ -10237,11 +10237,10 @@ Argomenti:
| unread | - |
Imposta l'evidenziatore di lettura dopo l'ultima riga del buffer
-// TRANSLATION MISSING
| display | "1", "auto" |
"1": passa a questo buffer nella finestra corrente +
- "auto": switch to this buffer in current window only if the buffer
- displayed is not the buffer set in the layout, read marker is not reset
+ "auto": passa a questo buffer nella finestra corrente, l'evidenziatore di
+ lettura non viene resettato
| number | numero |
Sposta buffer a questo numero
diff --git a/src/gui/gui-buffer.c b/src/gui/gui-buffer.c
index 269999119..daa461ac0 100644
--- a/src/gui/gui-buffer.c
+++ b/src/gui/gui-buffer.c
@@ -1492,7 +1492,6 @@ gui_buffer_set (struct t_gui_buffer *buffer, const char *property,
{
long number;
char *error;
- int auto_switch;
if (!property || !value)
return;
@@ -1528,19 +1527,13 @@ gui_buffer_set (struct t_gui_buffer *buffer, const char *property,
else if (string_strcasecmp (property, "display") == 0)
{
/*
- * on "automatic" switch:
- * - check if the buffer displayed in window is the buffer in layout:
- * if yes, do NOT switch to buffer
- * - do NOT set the read marker
+ * if it is auto-switch to a buffer, then we don't set read marker,
+ * otherwise we reset it (if current buffer is not displayed) after
+ * switch
*/
- auto_switch = (string_strcasecmp (value, "auto") == 0);
- if (!auto_switch
- || (gui_layout_window_check_buffer (gui_current_window) != 1))
- {
- gui_window_switch_to_buffer (gui_current_window,
- buffer,
- (auto_switch) ? 0 : 1);
- }
+ gui_window_switch_to_buffer (gui_current_window, buffer,
+ (string_strcasecmp (value, "auto") == 0) ?
+ 0 : 1);
}
else if (string_strcasecmp (property, "print_hooks_enabled") == 0)
{