1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-28 13:56:37 +02:00

Add syntax "*N" for /buffer (where N is a buffer number): jump to buffer number or previous buffer

This will switch to buffer #N or previously displayed buffer if current buffer is #N
(it uses option weechat.look.jump_current_to_previous_buffer).
Default keys alt-1 to alt-0 are now /buffer *N
This commit is contained in:
Sebastien Helleu
2009-05-12 18:16:32 +02:00
parent b860043646
commit 2ab1626fa9
21 changed files with 183 additions and 80 deletions
+5
View File
@@ -46,6 +46,11 @@
<entry>irc_msg_part</entry>
<entry>default part message for IRC channel</entry>
</row>
<row>
<entry>irc</entry>
<entry>irc_privates</entry>
<entry>IRC privates (on all servers)</entry>
</row>
<row>
<entry>irc</entry>
<entry>irc_server</entry>
+4 -2
View File
@@ -68,8 +68,10 @@ Puffer verwalten
reset: reset to default value (all)
localvar: display local variables for current buffer
set: set a property for current buffer
number: jump to buffer by number
server,
number: jump to buffer by number, possible prefix:
'+': relative jump, add number to current
'-': relative jump, sub number to current
'*': jump to number, using option "weechat.look.jump_current_to_previous_buffer"
name: jump to buffer by (partial) name
Examples:
+11 -1
View File
@@ -546,6 +546,16 @@
</listitem>
</itemizedlist>
<command>weechat.color.status_filter</command>: text color for filter indicator in status bar
<itemizedlist>
<listitem>
<para>type: color</para>
</listitem>
<listitem>
<para>values: a color name (default value: green)</para>
</listitem>
</itemizedlist>
<command>weechat.color.status_more</command>: text color for buffer with new data (status bar)
<itemizedlist>
<listitem>
@@ -836,7 +846,7 @@
</listitem>
</itemizedlist>
<command>weechat.look.jump_current_to_previous_buffer</command>: jump to previous buffer displayed when jumping to current buffer number (to easily switch to another buffer, then come back to current buffer)
<command>weechat.look.jump_current_to_previous_buffer</command>: jump to previous buffer displayed when jumping to current buffer number with /buffer *N (where N is a buffer number), to easily switch to another buffer, then come back to current buffer
<itemizedlist>
<listitem>
<para>type: boolean</para>
+5
View File
@@ -46,6 +46,11 @@
<entry>irc_msg_part</entry>
<entry>default part message for IRC channel</entry>
</row>
<row>
<entry>irc</entry>
<entry>irc_privates</entry>
<entry>IRC privates (on all servers)</entry>
</row>
<row>
<entry>irc</entry>
<entry>irc_server</entry>
+4 -2
View File
@@ -68,8 +68,10 @@ manage buffers
reset: reset to default value (all)
localvar: display local variables for current buffer
set: set a property for current buffer
number: jump to buffer by number
server,
number: jump to buffer by number, possible prefix:
'+': relative jump, add number to current
'-': relative jump, sub number to current
'*': jump to number, using option "weechat.look.jump_current_to_previous_buffer"
name: jump to buffer by (partial) name
Examples:
+11 -1
View File
@@ -546,6 +546,16 @@
</listitem>
</itemizedlist>
<command>weechat.color.status_filter</command>: text color for filter indicator in status bar
<itemizedlist>
<listitem>
<para>type: color</para>
</listitem>
<listitem>
<para>values: a color name (default value: green)</para>
</listitem>
</itemizedlist>
<command>weechat.color.status_more</command>: text color for buffer with new data (status bar)
<itemizedlist>
<listitem>
@@ -836,7 +846,7 @@
</listitem>
</itemizedlist>
<command>weechat.look.jump_current_to_previous_buffer</command>: jump to previous buffer displayed when jumping to current buffer number (to easily switch to another buffer, then come back to current buffer)
<command>weechat.look.jump_current_to_previous_buffer</command>: jump to previous buffer displayed when jumping to current buffer number with /buffer *N (where N is a buffer number), to easily switch to another buffer, then come back to current buffer
<itemizedlist>
<listitem>
<para>type: boolean</para>
+5
View File
@@ -46,6 +46,11 @@
<entry>irc_msg_part</entry>
<entry>message de fin par défaut pour le canal IRC</entry>
</row>
<row>
<entry>irc</entry>
<entry>irc_privates</entry>
<entry>canaux IRC (sur tous les serveurs)</entry>
</row>
<row>
<entry>irc</entry>
<entry>irc_server</entry>
+4 -1
View File
@@ -68,7 +68,10 @@ gestion des tampons
reset: réinitialise à valeur par défaut (all)
localvar: affiche la liste des variables locales pour le tampon courant
set: modifier une propriété du tampon courant
nombre: saute au tampon qui a ce numéro
nombre: saute au tampon qui a ce numéro, préfixe possible :
'+': saut relatif, ajoute le numéro au courant,
'-': saut relatif, soustrait le numéro au courant,
'*': saut au numéro en utilisant l'option "jump_current_to_previous_buffer"
nom: saute au tampon par nom (partiel)
Exemples:
+11 -1
View File
@@ -546,6 +546,16 @@
</listitem>
</itemizedlist>
<command>weechat.color.status_filter</command>: couleur du texte pour l'indicateur de filtrage dans la barre de statut
<itemizedlist>
<listitem>
<para>type: couleur</para>
</listitem>
<listitem>
<para>valeurs: un nom de couleur (valeur par défaut: green)</para>
</listitem>
</itemizedlist>
<command>weechat.color.status_more</command>: couleur du texte pour un tampon avec des nouvelles données (barre de statut)
<itemizedlist>
<listitem>
@@ -836,7 +846,7 @@
</listitem>
</itemizedlist>
<command>weechat.look.jump_current_to_previous_buffer</command>: sauter au tampon affiché précédemment lors du saut vers le numéro de tampon courant (pour facilement basculer à un autre tampon, puis revenir au tampon courant)
<command>weechat.look.jump_current_to_previous_buffer</command>: sauter au tampon affiché précédemment lors du saut vers le numéro de tampon courant avec /buffer *N (où N est un numéro de tampon), pour facilement basculer à un autre tampon, puis revenir au tampon courant
<itemizedlist>
<listitem>
<para>type: booléen</para>
+9 -5
View File
@@ -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-12 11:26+0200\n"
"POT-Creation-Date: 2009-05-12 17:51+0200\n"
"PO-Revision-Date: 2009-05-11 13:02+0200\n"
"Last-Translator: Jiri Golembiovsky <golemj@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -791,8 +791,11 @@ msgid ""
" reset: reset to default value (all)\n"
"localvar: display local variables for current buffer\n"
" set: set a property for current buffer\n"
" number: jump to buffer by number\n"
"server,\n"
" number: jump to buffer by number, possible prefix:\n"
" '+': relative jump, add number to current\n"
" '-': relative jump, sub number to current\n"
" '*': jump to number, using option \"weechat.look."
"jump_current_to_previous_buffer\"\n"
" name: jump to buffer by (partial) name\n"
"\n"
"Examples:\n"
@@ -1347,8 +1350,9 @@ msgid "time format for \"time\" bar item"
msgstr "formát času pro \"time\" položu pole"
msgid ""
"jump to previous buffer displayed when jumping to current buffer number (to "
"easily switch to another buffer, then come back to current buffer)"
"jump to previous buffer displayed when jumping to current buffer number "
"with /buffer *N (where N is a buffer number), to easily switch to another "
"buffer, then come back to current buffer"
msgstr ""
msgid "display nick mode ((half)op/voice) before each nick"
+9 -5
View File
@@ -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-12 11:26+0200\n"
"POT-Creation-Date: 2009-05-12 17:51+0200\n"
"PO-Revision-Date: 2009-05-11 13:02+0200\n"
"Last-Translator: Thomas Schuetz <i18n@internet-villa.de>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -848,8 +848,11 @@ msgid ""
" reset: reset to default value (all)\n"
"localvar: display local variables for current buffer\n"
" set: set a property for current buffer\n"
" number: jump to buffer by number\n"
"server,\n"
" number: jump to buffer by number, possible prefix:\n"
" '+': relative jump, add number to current\n"
" '-': relative jump, sub number to current\n"
" '*': jump to number, using option \"weechat.look."
"jump_current_to_previous_buffer\"\n"
" name: jump to buffer by (partial) name\n"
"\n"
"Examples:\n"
@@ -1366,8 +1369,9 @@ msgid "time format for \"time\" bar item"
msgstr "Timestamp in der Infobar"
msgid ""
"jump to previous buffer displayed when jumping to current buffer number (to "
"easily switch to another buffer, then come back to current buffer)"
"jump to previous buffer displayed when jumping to current buffer number "
"with /buffer *N (where N is a buffer number), to easily switch to another "
"buffer, then come back to current buffer"
msgstr ""
msgid "display nick mode ((half)op/voice) before each nick"
+9 -5
View File
@@ -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-12 11:26+0200\n"
"POT-Creation-Date: 2009-05-12 17:51+0200\n"
"PO-Revision-Date: 2009-05-11 13:02+0200\n"
"Last-Translator: Roberto González Cardenete <robert.glez@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -844,8 +844,11 @@ msgid ""
" reset: reset to default value (all)\n"
"localvar: display local variables for current buffer\n"
" set: set a property for current buffer\n"
" number: jump to buffer by number\n"
"server,\n"
" number: jump to buffer by number, possible prefix:\n"
" '+': relative jump, add number to current\n"
" '-': relative jump, sub number to current\n"
" '*': jump to number, using option \"weechat.look."
"jump_current_to_previous_buffer\"\n"
" name: jump to buffer by (partial) name\n"
"\n"
"Examples:\n"
@@ -1343,8 +1346,9 @@ msgid "time format for \"time\" bar item"
msgstr "fecha y hora para las conversaciones guardadas"
msgid ""
"jump to previous buffer displayed when jumping to current buffer number (to "
"easily switch to another buffer, then come back to current buffer)"
"jump to previous buffer displayed when jumping to current buffer number "
"with /buffer *N (where N is a buffer number), to easily switch to another "
"buffer, then come back to current buffer"
msgstr ""
msgid "display nick mode ((half)op/voice) before each nick"
+17 -9
View File
@@ -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-12 11:26+0200\n"
"PO-Revision-Date: 2009-05-12 11:27+0200\n"
"POT-Creation-Date: 2009-05-12 17:51+0200\n"
"PO-Revision-Date: 2009-05-12 17:51+0200\n"
"Last-Translator: FlashCode <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"MIME-Version: 1.0\n"
@@ -848,8 +848,11 @@ msgid ""
" reset: reset to default value (all)\n"
"localvar: display local variables for current buffer\n"
" set: set a property for current buffer\n"
" number: jump to buffer by number\n"
"server,\n"
" number: jump to buffer by number, possible prefix:\n"
" '+': relative jump, add number to current\n"
" '-': relative jump, sub number to current\n"
" '*': jump to number, using option \"weechat.look."
"jump_current_to_previous_buffer\"\n"
" name: jump to buffer by (partial) name\n"
"\n"
"Examples:\n"
@@ -875,7 +878,11 @@ msgstr ""
" reset: réinitialise à valeur par défaut (all)\n"
"localvar: affiche la liste des variables locales pour le tampon courant\n"
" set: modifier une propriété du tampon courant\n"
" nombre: saute au tampon qui a ce numéro\n"
" nombre: saute au tampon qui a ce numéro, préfixe possible :\n"
" '+': saut relatif, ajoute le numéro au courant,\n"
" '-': saut relatif, soustrait le numéro au courant,\n"
" '*': saut au numéro en utilisant l'option "
"\"jump_current_to_previous_buffer\"\n"
" nom: saute au tampon par nom (partiel)\n"
"\n"
"Exemples:\n"
@@ -1486,12 +1493,13 @@ msgid "time format for \"time\" bar item"
msgstr "format de date/heure pour l'objet de barre \"time\""
msgid ""
"jump to previous buffer displayed when jumping to current buffer number (to "
"easily switch to another buffer, then come back to current buffer)"
"jump to previous buffer displayed when jumping to current buffer number "
"with /buffer *N (where N is a buffer number), to easily switch to another "
"buffer, then come back to current buffer"
msgstr ""
"sauter au tampon affiché précédemment lors du saut vers le numéro de tampon "
"courant (pour facilement basculer à un autre tampon, puis revenir au tampon "
"courant)"
"courant avec /buffer *N (où N est un numéro de tampon), pour facilement "
"basculer à un autre tampon, puis revenir au tampon courant"
msgid "display nick mode ((half)op/voice) before each nick"
msgstr "afficher le mode du pseudo ((half)op/voice) devant chaque utilisateur"
+9 -5
View File
@@ -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-12 11:26+0200\n"
"POT-Creation-Date: 2009-05-12 17:51+0200\n"
"PO-Revision-Date: 2009-05-11 13:02+0200\n"
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -848,8 +848,11 @@ msgid ""
" reset: reset to default value (all)\n"
"localvar: display local variables for current buffer\n"
" set: set a property for current buffer\n"
" number: jump to buffer by number\n"
"server,\n"
" number: jump to buffer by number, possible prefix:\n"
" '+': relative jump, add number to current\n"
" '-': relative jump, sub number to current\n"
" '*': jump to number, using option \"weechat.look."
"jump_current_to_previous_buffer\"\n"
" name: jump to buffer by (partial) name\n"
"\n"
"Examples:\n"
@@ -1375,8 +1378,9 @@ msgid "time format for \"time\" bar item"
msgstr "időbélyeg a információs pult idejéhez"
msgid ""
"jump to previous buffer displayed when jumping to current buffer number (to "
"easily switch to another buffer, then come back to current buffer)"
"jump to previous buffer displayed when jumping to current buffer number "
"with /buffer *N (where N is a buffer number), to easily switch to another "
"buffer, then come back to current buffer"
msgstr ""
msgid "display nick mode ((half)op/voice) before each nick"
+9 -5
View File
@@ -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-12 11:26+0200\n"
"POT-Creation-Date: 2009-05-12 17:51+0200\n"
"PO-Revision-Date: 2009-05-11 13:02+0200\n"
"Last-Translator: <soltys@szluug.org>\n"
"Language-Team: Polish\n"
@@ -789,8 +789,11 @@ msgid ""
" reset: reset to default value (all)\n"
"localvar: display local variables for current buffer\n"
" set: set a property for current buffer\n"
" number: jump to buffer by number\n"
"server,\n"
" number: jump to buffer by number, possible prefix:\n"
" '+': relative jump, add number to current\n"
" '-': relative jump, sub number to current\n"
" '*': jump to number, using option \"weechat.look."
"jump_current_to_previous_buffer\"\n"
" name: jump to buffer by (partial) name\n"
"\n"
"Examples:\n"
@@ -1205,8 +1208,9 @@ msgid "time format for \"time\" bar item"
msgstr ""
msgid ""
"jump to previous buffer displayed when jumping to current buffer number (to "
"easily switch to another buffer, then come back to current buffer)"
"jump to previous buffer displayed when jumping to current buffer number "
"with /buffer *N (where N is a buffer number), to easily switch to another "
"buffer, then come back to current buffer"
msgstr ""
msgid "display nick mode ((half)op/voice) before each nick"
+9 -5
View File
@@ -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-12 11:26+0200\n"
"POT-Creation-Date: 2009-05-12 17:51+0200\n"
"PO-Revision-Date: 2009-05-11 13:02+0200\n"
"Last-Translator: Pavel Shevchuk <stlwrt@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -842,8 +842,11 @@ msgid ""
" reset: reset to default value (all)\n"
"localvar: display local variables for current buffer\n"
" set: set a property for current buffer\n"
" number: jump to buffer by number\n"
"server,\n"
" number: jump to buffer by number, possible prefix:\n"
" '+': relative jump, add number to current\n"
" '-': relative jump, sub number to current\n"
" '*': jump to number, using option \"weechat.look."
"jump_current_to_previous_buffer\"\n"
" name: jump to buffer by (partial) name\n"
"\n"
"Examples:\n"
@@ -1377,8 +1380,9 @@ msgid "time format for \"time\" bar item"
msgstr "время в информационной строке"
msgid ""
"jump to previous buffer displayed when jumping to current buffer number (to "
"easily switch to another buffer, then come back to current buffer)"
"jump to previous buffer displayed when jumping to current buffer number "
"with /buffer *N (where N is a buffer number), to easily switch to another "
"buffer, then come back to current buffer"
msgstr ""
msgid "display nick mode ((half)op/voice) before each nick"
+9 -5
View File
@@ -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-12 11:26+0200\n"
"POT-Creation-Date: 2009-05-12 17:51+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -757,8 +757,11 @@ msgid ""
" reset: reset to default value (all)\n"
"localvar: display local variables for current buffer\n"
" set: set a property for current buffer\n"
" number: jump to buffer by number\n"
"server,\n"
" number: jump to buffer by number, possible prefix:\n"
" '+': relative jump, add number to current\n"
" '-': relative jump, sub number to current\n"
" '*': jump to number, using option \"weechat.look."
"jump_current_to_previous_buffer\"\n"
" name: jump to buffer by (partial) name\n"
"\n"
"Examples:\n"
@@ -1173,8 +1176,9 @@ msgid "time format for \"time\" bar item"
msgstr ""
msgid ""
"jump to previous buffer displayed when jumping to current buffer number (to "
"easily switch to another buffer, then come back to current buffer)"
"jump to previous buffer displayed when jumping to current buffer number "
"with /buffer *N (where N is a buffer number), to easily switch to another "
"buffer, then come back to current buffer"
msgstr ""
msgid "display nick mode ((half)op/voice) before each nick"
+30 -3
View File
@@ -713,7 +713,31 @@ command_buffer (void *data, struct t_gui_buffer *buffer,
return WEECHAT_RC_OK;
}
/* smart jump (jump to previous buffer for current number) */
if (argv[1][0] == '*')
{
error = NULL;
number = strtol (argv[1] + 1, &error, 10);
if (error && !error[0])
{
/* buffer is currently displayed ? then jump to previous buffer */
if ((number == gui_current_window->buffer->number)
&& (CONFIG_BOOLEAN(config_look_jump_current_to_previous_buffer))
&& gui_previous_buffer)
{
number = gui_previous_buffer->number;
}
if (number != gui_current_window->buffer->number)
{
gui_buffer_switch_by_number (gui_current_window,
(int) number);
}
}
return WEECHAT_RC_OK;
}
/* jump to buffer by number or name */
error = NULL;
number = strtol (argv[1], &error, 10);
@@ -3688,8 +3712,11 @@ command_init ()
" reset: reset to default value (all)\n"
"localvar: display local variables for current buffer\n"
" set: set a property for current buffer\n"
" number: jump to buffer by number\n"
"server,\n"
" number: jump to buffer by number, possible prefix:\n"
" '+': relative jump, add number to current\n"
" '-': relative jump, sub number to current\n"
" '*': jump to number, using option "
"\"weechat.look.jump_current_to_previous_buffer\"\n"
" name: jump to buffer by (partial) name\n\n"
"Examples:\n"
"clear current buffer: /buffer clear\n"
+2 -2
View File
@@ -1301,8 +1301,8 @@ config_weechat_init_options ()
weechat_config_file, ptr_section,
"jump_current_to_previous_buffer", "boolean",
N_("jump to previous buffer displayed when jumping to current buffer "
"number (to easily switch to another buffer, then come back to "
"current buffer)"),
"number with /buffer *N (where N is a buffer number), to easily "
"switch to another buffer, then come back to current buffer"),
NULL, 0, 0, "on", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL);
config_look_nickmode = config_file_new_option (
weechat_config_file, ptr_section,
+10 -10
View File
@@ -164,16 +164,16 @@ gui_keyboard_default_bindings ()
gui_keyboard_default_bind (/* m-w,m-right */ "meta-wmeta-meta2-C", "/window right");
gui_keyboard_default_bind (/* m-z */ "meta-z", "/window zoom");
gui_keyboard_default_bind (/* m-= */ "meta-=", "/filter toggle");
gui_keyboard_default_bind (/* m-0 */ "meta-0", "/buffer 10");
gui_keyboard_default_bind (/* m-1 */ "meta-1", "/buffer 1");
gui_keyboard_default_bind (/* m-2 */ "meta-2", "/buffer 2");
gui_keyboard_default_bind (/* m-3 */ "meta-3", "/buffer 3");
gui_keyboard_default_bind (/* m-4 */ "meta-4", "/buffer 4");
gui_keyboard_default_bind (/* m-5 */ "meta-5", "/buffer 5");
gui_keyboard_default_bind (/* m-6 */ "meta-6", "/buffer 6");
gui_keyboard_default_bind (/* m-7 */ "meta-7", "/buffer 7");
gui_keyboard_default_bind (/* m-8 */ "meta-8", "/buffer 8");
gui_keyboard_default_bind (/* m-9 */ "meta-9", "/buffer 9");
gui_keyboard_default_bind (/* m-0 */ "meta-0", "/buffer *10");
gui_keyboard_default_bind (/* m-1 */ "meta-1", "/buffer *1");
gui_keyboard_default_bind (/* m-2 */ "meta-2", "/buffer *2");
gui_keyboard_default_bind (/* m-3 */ "meta-3", "/buffer *3");
gui_keyboard_default_bind (/* m-4 */ "meta-4", "/buffer *4");
gui_keyboard_default_bind (/* m-5 */ "meta-5", "/buffer *5");
gui_keyboard_default_bind (/* m-6 */ "meta-6", "/buffer *6");
gui_keyboard_default_bind (/* m-7 */ "meta-7", "/buffer *7");
gui_keyboard_default_bind (/* m-8 */ "meta-8", "/buffer *8");
gui_keyboard_default_bind (/* m-9 */ "meta-9", "/buffer *9");
/* bind meta-j + {01..99} to switch to buffers # > 10 */
for (i = 1; i < 100; i++)
+1 -13
View File
@@ -1489,21 +1489,9 @@ gui_buffer_switch_by_number (struct t_gui_window *window, int number)
struct t_gui_buffer *ptr_buffer;
/* invalid buffer */
if (number < 0)
if ((number < 0) || (number == window->buffer->number))
return;
/* buffer is currently displayed ? then jump to previous buffer */
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)
{