diff --git a/doc/de/autogen/weechat_commands.xml b/doc/de/autogen/weechat_commands.xml
index d9163335a..7f08235ab 100644
--- a/doc/de/autogen/weechat_commands.xml
+++ b/doc/de/autogen/weechat_commands.xml
@@ -150,7 +150,7 @@ clear: Löscht Verlauf
Anzahl: zeigt die gewünschte Anzahl an Verlaufseinträgen
-/input return | complete_next | complete_previous | search_next | delete_previous_char | delete_next_char | delete_previous_word | delete_next_word | delete_beginning_of_line | delete_end_of_line | delete_line | clipboard_paste | transpose_chars | move_beginning_of_line | move_end_of_line | move_previous_char | move_next_char | move_previous_word | move_next_word | history_previous | history_next | history_global_previous | history_global_next | jump_smart | jump_last_buffer | jump_previous_buffer | hotlist_clear | grab_key | scroll_unread | set_unread | set_unread_current_buffer | insert [args]
+/input return | complete_next | complete_previous | search_next | delete_previous_char | delete_next_char | delete_previous_word | delete_next_word | delete_beginning_of_line | delete_end_of_line | delete_line | clipboard_paste | transpose_chars | move_beginning_of_line | move_end_of_line | move_previous_char | move_next_char | move_previous_word | move_next_word | history_previous | history_next | history_global_previous | history_global_next | jump_smart | jump_last_buffer | jump_previously_visited_buffer | jump_next_visited_buffer | hotlist_clear | grab_key | scroll_unread | set_unread | set_unread_current_buffer | insert [args]
functions for command line
diff --git a/doc/de/autogen/weechat_options.xml b/doc/de/autogen/weechat_options.xml
index 9ea7dc14e..4702e7cb4 100644
--- a/doc/de/autogen/weechat_options.xml
+++ b/doc/de/autogen/weechat_options.xml
@@ -716,6 +716,16 @@
+weechat.history.max_visited_buffers: maximum number of visited buffers to keep in memory
+
+
+ type: integer
+
+
+ values: 0 .. 1000 (default value: 50)
+
+
+
weechat.look.buffer_notify_default: default notify level for buffers (used to tell WeeChat if buffer must be displayed in hotlist or not, according to importance of message)
diff --git a/doc/en/autogen/weechat_commands.xml b/doc/en/autogen/weechat_commands.xml
index 0739e6434..8ff739f4f 100644
--- a/doc/en/autogen/weechat_commands.xml
+++ b/doc/en/autogen/weechat_commands.xml
@@ -150,7 +150,7 @@ clear: clear history
value: number of history entries to show
-/input return | complete_next | complete_previous | search_next | delete_previous_char | delete_next_char | delete_previous_word | delete_next_word | delete_beginning_of_line | delete_end_of_line | delete_line | clipboard_paste | transpose_chars | move_beginning_of_line | move_end_of_line | move_previous_char | move_next_char | move_previous_word | move_next_word | history_previous | history_next | history_global_previous | history_global_next | jump_smart | jump_last_buffer | jump_previous_buffer | hotlist_clear | grab_key | scroll_unread | set_unread | set_unread_current_buffer | insert [args]
+/input return | complete_next | complete_previous | search_next | delete_previous_char | delete_next_char | delete_previous_word | delete_next_word | delete_beginning_of_line | delete_end_of_line | delete_line | clipboard_paste | transpose_chars | move_beginning_of_line | move_end_of_line | move_previous_char | move_next_char | move_previous_word | move_next_word | history_previous | history_next | history_global_previous | history_global_next | jump_smart | jump_last_buffer | jump_previously_visited_buffer | jump_next_visited_buffer | hotlist_clear | grab_key | scroll_unread | set_unread | set_unread_current_buffer | insert [args]
functions for command line
diff --git a/doc/en/autogen/weechat_options.xml b/doc/en/autogen/weechat_options.xml
index db177af34..2458adcfe 100644
--- a/doc/en/autogen/weechat_options.xml
+++ b/doc/en/autogen/weechat_options.xml
@@ -716,6 +716,16 @@
+weechat.history.max_visited_buffers: maximum number of visited buffers to keep in memory
+
+
+ type: integer
+
+
+ values: 0 .. 1000 (default value: 50)
+
+
+
weechat.look.buffer_notify_default: default notify level for buffers (used to tell WeeChat if buffer must be displayed in hotlist or not, according to importance of message)
diff --git a/doc/fr/autogen/weechat_commands.xml b/doc/fr/autogen/weechat_commands.xml
index 82f5f7db4..4a23ed575 100644
--- a/doc/fr/autogen/weechat_commands.xml
+++ b/doc/fr/autogen/weechat_commands.xml
@@ -150,7 +150,7 @@ clear: effacer l'historique
valeur: nombre d'entrées dans l'historique à afficher
-/input return | complete_next | complete_previous | search_next | delete_previous_char | delete_next_char | delete_previous_word | delete_next_word | delete_beginning_of_line | delete_end_of_line | delete_line | clipboard_paste | transpose_chars | move_beginning_of_line | move_end_of_line | move_previous_char | move_next_char | move_previous_word | move_next_word | history_previous | history_next | history_global_previous | history_global_next | jump_smart | jump_last_buffer | jump_previous_buffer | hotlist_clear | grab_key | scroll_unread | set_unread | set_unread_current_buffer | insert [args]
+/input return | complete_next | complete_previous | search_next | delete_previous_char | delete_next_char | delete_previous_word | delete_next_word | delete_beginning_of_line | delete_end_of_line | delete_line | clipboard_paste | transpose_chars | move_beginning_of_line | move_end_of_line | move_previous_char | move_next_char | move_previous_word | move_next_word | history_previous | history_next | history_global_previous | history_global_next | jump_smart | jump_last_buffer | jump_previously_visited_buffer | jump_next_visited_buffer | hotlist_clear | grab_key | scroll_unread | set_unread | set_unread_current_buffer | insert [args]
fonctions pour la ligne de commande
diff --git a/doc/fr/autogen/weechat_options.xml b/doc/fr/autogen/weechat_options.xml
index 54c18db9e..3dad840e9 100644
--- a/doc/fr/autogen/weechat_options.xml
+++ b/doc/fr/autogen/weechat_options.xml
@@ -716,6 +716,16 @@
+weechat.history.max_visited_buffers: nombre maximum de tampons visités à garder en mémoire
+
+
+ type: entier
+
+
+ valeurs: 0 .. 1000 (valeur par défaut: 50)
+
+
+
weechat.look.buffer_notify_default: niveau de notification par défaut pour les tampons (utilisé pour dire à WeeChat si le tampon doit être affiché dans la hotlist ou non, selon l'importance du message)
diff --git a/po/cs.po b/po/cs.po
index 06276bbd1..2f923d496 100644
--- a/po/cs.po
+++ b/po/cs.po
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.0-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2009-05-16 00:36+0200\n"
+"POT-Creation-Date: 2009-05-18 18:04+0200\n"
"PO-Revision-Date: 2009-05-11 13:02+0200\n"
"Last-Translator: Jiri Golembiovsky \n"
"Language-Team: weechat-dev \n"
@@ -1701,6 +1701,10 @@ msgstr "maximální počet uživatelských příkazů v historii (0 = nekonečn
msgid "maximum number of user commands in history (0 = unlimited)"
msgstr "maximální počet uživatelských příkazů v historii (0 = nekonečně)"
+#, fuzzy
+msgid "maximum number of visited buffers to keep in memory"
+msgstr "maximální počet uživatelských příkazů v historii (0 = nekonečně)"
+
msgid ""
"maximum number of commands to display by default in history listing (0 = "
"unlimited)"
diff --git a/po/de.po b/po/de.po
index 09ec116df..e3fc3ab55 100644
--- a/po/de.po
+++ b/po/de.po
@@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.0-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2009-05-16 00:36+0200\n"
+"POT-Creation-Date: 2009-05-18 18:04+0200\n"
"PO-Revision-Date: 2009-05-11 13:02+0200\n"
"Last-Translator: Thomas Schuetz \n"
"Language-Team: weechat-dev \n"
@@ -1719,6 +1719,10 @@ msgstr "maximale Anzahl an Befehlen im Verlauf (0: kein Limit)"
msgid "maximum number of user commands in history (0 = unlimited)"
msgstr "maximale Anzahl an Befehlen im Verlauf (0: kein Limit)"
+#, fuzzy
+msgid "maximum number of visited buffers to keep in memory"
+msgstr "maximale Anzahl an Befehlen im Verlauf (0: kein Limit)"
+
msgid ""
"maximum number of commands to display by default in history listing (0 = "
"unlimited)"
diff --git a/po/es.po b/po/es.po
index 368097185..80b3e7f16 100644
--- a/po/es.po
+++ b/po/es.po
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.0-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2009-05-16 00:36+0200\n"
+"POT-Creation-Date: 2009-05-18 18:04+0200\n"
"PO-Revision-Date: 2009-05-11 13:02+0200\n"
"Last-Translator: Roberto González Cardenete \n"
"Language-Team: weechat-dev \n"
@@ -1702,6 +1702,11 @@ msgid "maximum number of user commands in history (0 = unlimited)"
msgstr ""
"número múximo de comandos de usuario en el histórico (0 = ilimitado)"
+#, fuzzy
+msgid "maximum number of visited buffers to keep in memory"
+msgstr ""
+"número múximo de comandos de usuario en el histórico (0 = ilimitado)"
+
msgid ""
"maximum number of commands to display by default in history listing (0 = "
"unlimited)"
diff --git a/po/fr.po b/po/fr.po
index 6cbf011ad..5e9871ebc 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.0-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2009-05-16 00:36+0200\n"
-"PO-Revision-Date: 2009-05-16 00:36+0200\n"
+"POT-Creation-Date: 2009-05-18 18:04+0200\n"
+"PO-Revision-Date: 2009-05-18 18:04+0200\n"
"Last-Translator: FlashCode \n"
"Language-Team: weechat-dev \n"
"MIME-Version: 1.0\n"
@@ -1808,6 +1808,9 @@ msgid "maximum number of user commands in history (0 = unlimited)"
msgstr ""
"nombre maximum de commandes utilisateur dans l'historique (0 = sans limite)"
+msgid "maximum number of visited buffers to keep in memory"
+msgstr "nombre maximum de tampons visités à garder en mémoire"
+
msgid ""
"maximum number of commands to display by default in history listing (0 = "
"unlimited)"
diff --git a/po/hu.po b/po/hu.po
index 8528351b3..a75ebc669 100644
--- a/po/hu.po
+++ b/po/hu.po
@@ -12,7 +12,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.0-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2009-05-16 00:36+0200\n"
+"POT-Creation-Date: 2009-05-18 18:04+0200\n"
"PO-Revision-Date: 2009-05-11 13:02+0200\n"
"Last-Translator: Andras Voroskoi \n"
"Language-Team: weechat-dev \n"
@@ -1730,6 +1730,11 @@ msgid "maximum number of user commands in history (0 = unlimited)"
msgstr ""
"felhasználói parancsok maximális száma az előzményekben (0 = korlátlan)"
+#, fuzzy
+msgid "maximum number of visited buffers to keep in memory"
+msgstr ""
+"felhasználói parancsok maximális száma az előzményekben (0 = korlátlan)"
+
msgid ""
"maximum number of commands to display by default in history listing (0 = "
"unlimited)"
diff --git a/po/pl.po b/po/pl.po
index b39fc80c8..26fa7af06 100644
--- a/po/pl.po
+++ b/po/pl.po
@@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.0-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2009-05-16 00:36+0200\n"
+"POT-Creation-Date: 2009-05-18 18:04+0200\n"
"PO-Revision-Date: 2009-05-11 13:02+0200\n"
"Last-Translator: \n"
"Language-Team: Polish\n"
@@ -1486,6 +1486,9 @@ msgstr ""
msgid "maximum number of user commands in history (0 = unlimited)"
msgstr ""
+msgid "maximum number of visited buffers to keep in memory"
+msgstr ""
+
msgid ""
"maximum number of commands to display by default in history listing (0 = "
"unlimited)"
diff --git a/po/ru.po b/po/ru.po
index 6d43340ee..5e92ac64c 100644
--- a/po/ru.po
+++ b/po/ru.po
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.0-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2009-05-16 00:36+0200\n"
+"POT-Creation-Date: 2009-05-18 18:04+0200\n"
"PO-Revision-Date: 2009-05-11 13:02+0200\n"
"Last-Translator: Pavel Shevchuk \n"
"Language-Team: weechat-dev \n"
@@ -1731,6 +1731,10 @@ msgstr "максимальное количество команд в истор
msgid "maximum number of user commands in history (0 = unlimited)"
msgstr "максимальное количество команд в истории (0 = не ограничено)"
+#, fuzzy
+msgid "maximum number of visited buffers to keep in memory"
+msgstr "максимальное количество команд в истории (0 = не ограничено)"
+
msgid ""
"maximum number of commands to display by default in history listing (0 = "
"unlimited)"
diff --git a/po/weechat.pot b/po/weechat.pot
index 8638fdeca..68cb27561 100644
--- a/po/weechat.pot
+++ b/po/weechat.pot
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2009-05-16 00:36+0200\n"
+"POT-Creation-Date: 2009-05-18 18:04+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
"Language-Team: LANGUAGE \n"
@@ -1454,6 +1454,9 @@ msgstr ""
msgid "maximum number of user commands in history (0 = unlimited)"
msgstr ""
+msgid "maximum number of visited buffers to keep in memory"
+msgstr ""
+
msgid ""
"maximum number of commands to display by default in history listing (0 = "
"unlimited)"
diff --git a/src/core/wee-config.c b/src/core/wee-config.c
index d90d89c6f..68ae437e7 100644
--- a/src/core/wee-config.c
+++ b/src/core/wee-config.c
@@ -163,6 +163,7 @@ struct t_config_option *config_completion_partial_completion_count;
struct t_config_option *config_history_max_lines;
struct t_config_option *config_history_max_commands;
+struct t_config_option *config_history_max_visited_buffers;
struct t_config_option *config_history_display_default;
/* config, network section */
@@ -1853,6 +1854,11 @@ config_weechat_init_options ()
N_("maximum number of user commands in history (0 = "
"unlimited)"),
NULL, 0, INT_MAX, "100", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL);
+ config_history_max_visited_buffers = config_file_new_option (
+ weechat_config_file, ptr_section,
+ "max_visited_buffers", "integer",
+ N_("maximum number of visited buffers to keep in memory"),
+ NULL, 0, 1000, "50", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL);
config_history_display_default = config_file_new_option (
weechat_config_file, ptr_section,
"display_default", "integer",
diff --git a/src/core/wee-config.h b/src/core/wee-config.h
index cfd7809c4..11d296c15 100644
--- a/src/core/wee-config.h
+++ b/src/core/wee-config.h
@@ -165,6 +165,7 @@ extern struct t_config_option *config_completion_partial_completion_count;
extern struct t_config_option *config_history_max_lines;
extern struct t_config_option *config_history_max_commands;
+extern struct t_config_option *config_history_max_visited_buffers;
extern struct t_config_option *config_history_display_default;
extern struct t_config_option *config_network_gnutls_dh_prime_bits;
diff --git a/src/gui/gui-buffer.c b/src/gui/gui-buffer.c
index a582d3508..4cc719882 100644
--- a/src/gui/gui-buffer.c
+++ b/src/gui/gui-buffer.c
@@ -1761,7 +1761,7 @@ gui_buffer_visited_add (struct t_gui_buffer *buffer)
gui_buffer_visited_remove (new_buffer_visited);
/* remove old buffer(s) visited if list is too long */
- while (gui_buffers_visited_count > GUI_BUFFERS_VISITED_MAX)
+ while (gui_buffers_visited_count > CONFIG_INTEGER(config_history_max_visited_buffers))
{
gui_buffer_visited_remove (gui_buffers_visited);
}
diff --git a/src/gui/gui-buffer.h b/src/gui/gui-buffer.h
index a49b6910f..c46033d6f 100644
--- a/src/gui/gui-buffer.h
+++ b/src/gui/gui-buffer.h
@@ -47,8 +47,6 @@ enum t_gui_buffer_notify
#define GUI_BUFFER_INPUT_BLOCK_SIZE 256
-#define GUI_BUFFERS_VISITED_MAX 50
-
/* buffer structures */
struct t_gui_line
diff --git a/src/gui/gui-input.c b/src/gui/gui-input.c
index 49efa7cc6..645ac945b 100644
--- a/src/gui/gui-input.c
+++ b/src/gui/gui-input.c
@@ -30,7 +30,6 @@
#include "../core/wee-config.h"
#include "../core/wee-hook.h"
#include "../core/wee-input.h"
-#include "../core/wee-log.h"
#include "../core/wee-string.h"
#include "../core/wee-utf8.h"
#include "../plugins/plugin.h"
@@ -1160,7 +1159,6 @@ gui_input_jump_previously_visited_buffer ()
if (index >= 0)
{
gui_buffers_visited_index = index;
- log_printf ("prev: index = %d", index);
ptr_buffer_visited = gui_buffer_visited_search_by_number (gui_buffers_visited_index);
if (ptr_buffer_visited)