Add some chars after cursor when scrolling input line: new option weechat.look.input_cursor_scroll (bug #21391)

This commit is contained in:
Sebastien Helleu 2011-01-31 21:42:04 +01:00
parent b19ae11622
commit 142fc29e25
18 changed files with 99 additions and 18 deletions

View File

@ -7,6 +7,8 @@ v0.3.5-dev, 2011-01-31
Version 0.3.5 (under dev!)
--------------------------
* core: add some chars after cursor when scrolling input line: new option
weechat.look.input_cursor_scroll (bug #21391)
* core: dynamically allocate color pairs (extended colors can be used without
being added with command "/color add")
* core: allow background for nick colors (using "/")

View File

@ -383,6 +383,11 @@
** Typ: boolesch
** Werte: on, off (Standardwert: `on`)
* *weechat.look.input_cursor_scroll*
** Beschreibung: `number of chars displayed after end of input line when scrolling to display end of line`
** Typ: integer
** Werte: 0 .. 100 (Standardwert: `20`)
* *weechat.look.input_share*
** Beschreibung: `Mit dieser Option kann man den Inhalt der Eingabezeile in allen Buffern verwenden. Es können dabei nur Befehle (commands), nur Text (text), beides (all) berücksichtigt werden (Der Befehlsverlauf der einzelnen Buffer bleibt hierbei erhalten)`
** Typ: integer

View File

@ -383,6 +383,11 @@
** type: boolean
** values: on, off (default value: `on`)
* *weechat.look.input_cursor_scroll*
** description: `number of chars displayed after end of input line when scrolling to display end of line`
** type: integer
** values: 0 .. 100 (default value: `20`)
* *weechat.look.input_share*
** description: `share commands, text, or both in input for all buffers (there is still local history for each buffer)`
** type: integer

View File

@ -383,6 +383,11 @@
** type: booléen
** valeurs: on, off (valeur par défaut: `on`)
* *weechat.look.input_cursor_scroll*
** description: `nombre de caractères affichés après la fin de la ligne de saisie lors d'un défilement pour afficher la fin de la ligne`
** type: entier
** valeurs: 0 .. 100 (valeur par défaut: `20`)
* *weechat.look.input_share*
** description: `partage les commandes, le texte, ou les deux dans la zone de saisie pour tous les tampons (il y a toujours un historique local sur chaque tampon)`
** type: entier

View File

@ -383,6 +383,11 @@
** tipo: bool
** valori: on, off (valore predefinito: `on`)
* *weechat.look.input_cursor_scroll*
** descrizione: `number of chars displayed after end of input line when scrolling to display end of line`
** tipo: intero
** valori: 0 .. 100 (valore predefinito: `20`)
* *weechat.look.input_share*
** descrizione: `condivide comandi, testo o entrambi in input per tutti i buffer (resta tuttavia la cronologia locale per ogni buffer)`
** tipo: intero

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.5-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2011-01-31 18:41+0100\n"
"POT-Creation-Date: 2011-01-31 21:01+0100\n"
"PO-Revision-Date: 2011-01-31 14:50+0100\n"
"Last-Translator: Jiri Golembiovsky <golemj@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -1949,6 +1949,11 @@ msgstr ""
"maximální počet jmen v hotlistu (0 = žádné jméno není zobrazeno, pouze čísla "
"bufferů)"
msgid ""
"number of chars displayed after end of input line when scrolling to display "
"end of line"
msgstr ""
msgid ""
"share commands, text, or both in input for all buffers (there is still local "
"history for each buffer)"

View File

@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.5-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2011-01-31 20:53+0100\n"
"POT-Creation-Date: 2011-01-31 21:01+0100\n"
"PO-Revision-Date: 2011-01-31 20:13+0100\n"
"Last-Translator: Nils G.\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -2046,6 +2046,11 @@ msgstr ""
"Es wird nur jeweils einmal die Nummer des Buffers in der Hotlist angezeigt "
"(diese Option kommt nur zum Tragen sofern KEINE Buffernamen angezeigt werden)"
msgid ""
"number of chars displayed after end of input line when scrolling to display "
"end of line"
msgstr ""
msgid ""
"share commands, text, or both in input for all buffers (there is still local "
"history for each buffer)"

View File

@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.5-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2011-01-31 18:41+0100\n"
"POT-Creation-Date: 2011-01-31 21:01+0100\n"
"PO-Revision-Date: 2011-01-31 18:57+0100\n"
"Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -1999,6 +1999,11 @@ msgstr ""
"en los elementos de la lista donde el nombre NO es mostrado después del "
"número)"
msgid ""
"number of chars displayed after end of input line when scrolling to display "
"end of line"
msgstr ""
msgid ""
"share commands, text, or both in input for all buffers (there is still local "
"history for each buffer)"

View File

@ -21,8 +21,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.5-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2011-01-31 18:41+0100\n"
"PO-Revision-Date: 2011-01-31 18:57+0100\n"
"POT-Creation-Date: 2011-01-31 21:01+0100\n"
"PO-Revision-Date: 2011-01-31 21:01+0100\n"
"Last-Translator: Sebastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"Language: French\n"
@ -2004,6 +2004,13 @@ msgstr ""
"seulement aux éléments de la hotlist où le nom n'est PAS affiché après le "
"numéro)"
msgid ""
"number of chars displayed after end of input line when scrolling to display "
"end of line"
msgstr ""
"nombre de caractères affichés après la fin de la ligne de saisie lors d'un "
"défilement pour afficher la fin de la ligne"
msgid ""
"share commands, text, or both in input for all buffers (there is still local "
"history for each buffer)"

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.5-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2011-01-31 18:41+0100\n"
"POT-Creation-Date: 2011-01-31 21:01+0100\n"
"PO-Revision-Date: 2011-01-31 14:50+0100\n"
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -1744,6 +1744,11 @@ msgid ""
"where name is NOT displayed after number)"
msgstr ""
msgid ""
"number of chars displayed after end of input line when scrolling to display "
"end of line"
msgstr ""
msgid ""
"share commands, text, or both in input for all buffers (there is still local "
"history for each buffer)"

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.5-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2011-01-31 18:41+0100\n"
"POT-Creation-Date: 2011-01-31 21:01+0100\n"
"PO-Revision-Date: 2011-01-31 18:57+0100\n"
"Last-Translator: Marco Paolone <marcopaolone@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -2000,6 +2000,11 @@ msgstr ""
"mantiene solo numeri univoci nella hotlist (vale solo per gli elementi della "
"hotlist per cui il nome NON viene visualizzato dopo il numero)"
msgid ""
"number of chars displayed after end of input line when scrolling to display "
"end of line"
msgstr ""
msgid ""
"share commands, text, or both in input for all buffers (there is still local "
"history for each buffer)"

View File

@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.5-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2011-01-31 18:41+0100\n"
"POT-Creation-Date: 2011-01-31 21:01+0100\n"
"PO-Revision-Date: 2011-01-31 18:57+0100\n"
"Last-Translator: Krzysztof Koroscik <soltys@szluug.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -2006,6 +2006,11 @@ msgstr ""
"zatrzymaj unikalne numery na hotliście (stosowane tylko dla elementów "
"hotlisty, w których nazwa NIE jest wyświetlana po numerze)"
msgid ""
"number of chars displayed after end of input line when scrolling to display "
"end of line"
msgstr ""
msgid ""
"share commands, text, or both in input for all buffers (there is still local "
"history for each buffer)"

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.5-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2011-01-31 18:41+0100\n"
"POT-Creation-Date: 2011-01-31 21:01+0100\n"
"PO-Revision-Date: 2011-01-31 14:51+0100\n"
"Last-Translator: Ivan Sichmann Freitas <ivansichfreitas@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -1997,6 +1997,11 @@ msgid ""
"where name is NOT displayed after number)"
msgstr ""
msgid ""
"number of chars displayed after end of input line when scrolling to display "
"end of line"
msgstr ""
msgid ""
"share commands, text, or both in input for all buffers (there is still local "
"history for each buffer)"

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.5-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2011-01-31 18:41+0100\n"
"POT-Creation-Date: 2011-01-31 21:01+0100\n"
"PO-Revision-Date: 2011-01-31 14:51+0100\n"
"Last-Translator: Pavel Shevchuk <stlwrt@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -1762,6 +1762,11 @@ msgstr ""
"максимальное количество имён в хотлисте (0 = имена не показываются, только "
"номера буферов)"
msgid ""
"number of chars displayed after end of input line when scrolling to display "
"end of line"
msgstr ""
msgid ""
"share commands, text, or both in input for all buffers (there is still local "
"history for each buffer)"

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: 2011-01-31 18:41+0100\n"
"POT-Creation-Date: 2011-01-31 21:01+0100\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"
@ -1503,6 +1503,11 @@ msgid ""
"where name is NOT displayed after number)"
msgstr ""
msgid ""
"number of chars displayed after end of input line when scrolling to display "
"end of line"
msgstr ""
msgid ""
"share commands, text, or both in input for all buffers (there is still local "
"history for each buffer)"

View File

@ -93,6 +93,7 @@ struct t_config_option *config_look_hotlist_names_merged_buffers;
struct t_config_option *config_look_hotlist_short_names;
struct t_config_option *config_look_hotlist_sort;
struct t_config_option *config_look_hotlist_unique_numbers;
struct t_config_option *config_look_input_cursor_scroll;
struct t_config_option *config_look_input_share;
struct t_config_option *config_look_input_share_overwrite;
struct t_config_option *config_look_input_undo_max;
@ -1561,6 +1562,12 @@ config_weechat_init_options ()
N_("keep only unique numbers in hotlist (this applies only on hotlist "
"items where name is NOT displayed after number)"),
NULL, 0, 0, "on", NULL, 0, NULL, NULL, &config_change_buffer_content, NULL, NULL, NULL);
config_look_input_cursor_scroll = config_file_new_option (
weechat_config_file, ptr_section,
"input_cursor_scroll", "integer",
N_("number of chars displayed after end of input line when scrolling "
"to display end of line"),
NULL, 0, 100, "20", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL);
config_look_input_share = config_file_new_option (
weechat_config_file, ptr_section,
"input_share", "integer",

View File

@ -122,6 +122,7 @@ extern struct t_config_option *config_look_hotlist_names_merged_buffers;
extern struct t_config_option *config_look_hotlist_short_names;
extern struct t_config_option *config_look_hotlist_sort;
extern struct t_config_option *config_look_hotlist_unique_numbers;
extern struct t_config_option *config_look_input_cursor_scroll;
extern struct t_config_option *config_look_input_share;
extern struct t_config_option *config_look_input_share_overwrite;
extern struct t_config_option *config_look_input_undo_max;

View File

@ -697,13 +697,12 @@ gui_bar_window_draw (struct t_gui_bar_window *bar_window,
diff = length_screen_before_cursor - chars_available;
if (diff > 0)
{
/*
* FIXME: keep some spaces after end of input
* for example by adding something to diff, like:
* diff += (9 - (diff % 10));
* but then scroll position has to be saved
* (in bar window ?)
*/
if (CONFIG_INTEGER(config_look_input_cursor_scroll) > 0)
{
diff += (CONFIG_INTEGER(config_look_input_cursor_scroll)
- 1
- (diff % CONFIG_INTEGER(config_look_input_cursor_scroll)));
}
/* compute new start for displaying input */
new_start_input = pos_after_start_input + gui_chat_string_real_pos (pos_after_start_input, diff);