mirror of
https://github.com/weechat/weechat.git
synced 2026-06-12 14:14:48 +02:00
core: add new option weechat.completion.base_word_until_cursor: allow completion in middle of words (enabled by default) (task #9771)
This commit is contained in:
@@ -7,6 +7,8 @@ v0.3.7-dev, 2011-11-12
|
||||
Version 0.3.7 (under dev!)
|
||||
--------------------------
|
||||
|
||||
* core: add new option weechat.completion.base_word_until_cursor: allow
|
||||
completion in middle of words (enabled by default) (task #9771)
|
||||
* core: add option "jump_last_buffer_displayed" for command /input
|
||||
(key: alt+"/") (task #11553)
|
||||
* core: display error in command /buffer if arguments are wrong (bug #34180)
|
||||
|
||||
@@ -263,6 +263,11 @@
|
||||
** Typ: Farbe
|
||||
** Werte: ein Farbname für WeeChat (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), eine Terminal-Farbnummer oder ein Alias; Attribute werden vor einer Farbe gesetzt (ausschließlich für die Textfarbe und nicht für den Hintergrund): "*" für fett, "!" für invertiert, "_" für unterstrichen (Standardwert: `default`)
|
||||
|
||||
* [[option_weechat.completion.base_word_until_cursor]] *weechat.completion.base_word_until_cursor*
|
||||
** Beschreibung: `if enabled, the base word to complete ends at char before cursor; otherwise the base word ends at first space after cursor`
|
||||
** Typ: boolesch
|
||||
** Werte: on, off (Standardwert: `on`)
|
||||
|
||||
* [[option_weechat.completion.default_template]] *weechat.completion.default_template*
|
||||
** Beschreibung: `Standardvorlage für die automatische Vervollständigung (in der Dokumentation finden Sie die vorgegebenen Codes und Werte)`
|
||||
** Typ: Zeichenkette
|
||||
|
||||
@@ -263,6 +263,11 @@
|
||||
** type: color
|
||||
** values: a WeeChat color name (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), a terminal color number or an alias; attributes are allowed before color (for text color only, not background): "*" for bold, "!" for reverse, "_" for underline (default value: `default`)
|
||||
|
||||
* [[option_weechat.completion.base_word_until_cursor]] *weechat.completion.base_word_until_cursor*
|
||||
** description: `if enabled, the base word to complete ends at char before cursor; otherwise the base word ends at first space after cursor`
|
||||
** type: boolean
|
||||
** values: on, off (default value: `on`)
|
||||
|
||||
* [[option_weechat.completion.default_template]] *weechat.completion.default_template*
|
||||
** description: `default completion template (please see documentation for template codes and values)`
|
||||
** type: string
|
||||
|
||||
@@ -263,6 +263,11 @@
|
||||
** type: couleur
|
||||
** valeurs: un nom de couleur WeeChat (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), un numéro de couleur du terminal ou un alias; des attributs sont autorisés avant la couleur (seulement pour la couleur du texte, pas le fond) : "*" pour du gras, "!" pour la vidéo inverse, "_" pour du souligné (valeur par défaut: `default`)
|
||||
|
||||
* [[option_weechat.completion.base_word_until_cursor]] *weechat.completion.base_word_until_cursor*
|
||||
** description: `si activé, le mot de base pour la complétion s'arrête au caractère avant le curseur; sinon le mot de base s'arrête au premier espace après le curseur`
|
||||
** type: booléen
|
||||
** valeurs: on, off (valeur par défaut: `on`)
|
||||
|
||||
* [[option_weechat.completion.default_template]] *weechat.completion.default_template*
|
||||
** description: `modèle de complétion par défaut (merci de consulter la documentation pour les codes et valeurs du modèle)`
|
||||
** type: chaîne
|
||||
|
||||
@@ -263,6 +263,11 @@
|
||||
** tipo: colore
|
||||
** valori: un nome colore di WeeChat (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), un numero colore del terminale o un alias; attributi consentiti prima del colore (solo per il colore del testo, non lo sfondo): "*" per il grassetto, "!" per l'inverso, "_" per la sottolineatura (valore predefinito: `default`)
|
||||
|
||||
* [[option_weechat.completion.base_word_until_cursor]] *weechat.completion.base_word_until_cursor*
|
||||
** descrizione: `if enabled, the base word to complete ends at char before cursor; otherwise the base word ends at first space after cursor`
|
||||
** tipo: bool
|
||||
** valori: on, off (valore predefinito: `on`)
|
||||
|
||||
* [[option_weechat.completion.default_template]] *weechat.completion.default_template*
|
||||
** descrizione: `modello di completamento predefinito (consulta la documentazione per codici e valori del template)`
|
||||
** tipo: stringa
|
||||
|
||||
@@ -20,7 +20,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat 0.3.7-dev\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2011-11-08 17:56+0100\n"
|
||||
"POT-Creation-Date: 2011-11-12 16:06+0100\n"
|
||||
"PO-Revision-Date: 2011-11-03 16:57+0100\n"
|
||||
"Last-Translator: Jiri Golembiovsky <golemj@gmail.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -2792,6 +2792,11 @@ msgstr "barva textu pro nepřítomné přezdíveky"
|
||||
msgid "text color for offline nicknames"
|
||||
msgstr "barva textu pro nepřipojené přezdíveky"
|
||||
|
||||
msgid ""
|
||||
"if enabled, the base word to complete ends at char before cursor; otherwise "
|
||||
"the base word ends at first space after cursor"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"default completion template (please see documentation for template codes and "
|
||||
"values)"
|
||||
|
||||
@@ -22,7 +22,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat 0.3.7-dev\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2011-11-08 22:58+0100\n"
|
||||
"POT-Creation-Date: 2011-11-12 16:06+0100\n"
|
||||
"PO-Revision-Date: 2011-11-08 22:03+0100\n"
|
||||
"Last-Translator: Nils Görs\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -3048,6 +3048,11 @@ msgstr "Textfarbe von abwesenden Nicknamen"
|
||||
msgid "text color for offline nicknames"
|
||||
msgstr "Textfarbe von Nicknamen die Offline sind"
|
||||
|
||||
msgid ""
|
||||
"if enabled, the base word to complete ends at char before cursor; otherwise "
|
||||
"the base word ends at first space after cursor"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"default completion template (please see documentation for template codes and "
|
||||
"values)"
|
||||
|
||||
@@ -21,7 +21,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat 0.3.7-dev\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2011-11-08 17:56+0100\n"
|
||||
"POT-Creation-Date: 2011-11-12 16:06+0100\n"
|
||||
"PO-Revision-Date: 2011-11-03 16:57+0100\n"
|
||||
"Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -2952,6 +2952,11 @@ msgstr "color para apodos ausentes"
|
||||
msgid "text color for offline nicknames"
|
||||
msgstr "color para apodos desconectados"
|
||||
|
||||
msgid ""
|
||||
"if enabled, the base word to complete ends at char before cursor; otherwise "
|
||||
"the base word ends at first space after cursor"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"default completion template (please see documentation for template codes and "
|
||||
"values)"
|
||||
|
||||
@@ -21,8 +21,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat 0.3.7-dev\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2011-11-08 17:56+0100\n"
|
||||
"PO-Revision-Date: 2011-11-08 17:15+0100\n"
|
||||
"POT-Creation-Date: 2011-11-12 16:06+0100\n"
|
||||
"PO-Revision-Date: 2011-11-12 16:06+0100\n"
|
||||
"Last-Translator: Sebastien Helleu <flashcode@flashtux.org>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
"Language: French\n"
|
||||
@@ -2969,6 +2969,13 @@ msgstr "couleur du texte pour les pseudos absents"
|
||||
msgid "text color for offline nicknames"
|
||||
msgstr "couleur du texte pour les pseudos déconnectés"
|
||||
|
||||
msgid ""
|
||||
"if enabled, the base word to complete ends at char before cursor; otherwise "
|
||||
"the base word ends at first space after cursor"
|
||||
msgstr ""
|
||||
"si activé, le mot de base pour la complétion s'arrête au caractère avant le "
|
||||
"curseur; sinon le mot de base s'arrête au premier espace après le curseur"
|
||||
|
||||
msgid ""
|
||||
"default completion template (please see documentation for template codes and "
|
||||
"values)"
|
||||
|
||||
@@ -20,7 +20,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat 0.3.7-dev\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2011-11-08 17:56+0100\n"
|
||||
"POT-Creation-Date: 2011-11-12 16:06+0100\n"
|
||||
"PO-Revision-Date: 2011-10-22 12:21+0200\n"
|
||||
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -2463,6 +2463,11 @@ msgstr "távollevő felhasználók nevének színe"
|
||||
msgid "text color for offline nicknames"
|
||||
msgstr "távollevő felhasználók nevének színe"
|
||||
|
||||
msgid ""
|
||||
"if enabled, the base word to complete ends at char before cursor; otherwise "
|
||||
"the base word ends at first space after cursor"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"default completion template (please see documentation for template codes and "
|
||||
"values)"
|
||||
|
||||
@@ -20,7 +20,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat 0.3.7-dev\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2011-11-08 17:56+0100\n"
|
||||
"POT-Creation-Date: 2011-11-12 16:06+0100\n"
|
||||
"PO-Revision-Date: 2011-11-03 16:57+0100\n"
|
||||
"Last-Translator: Marco Paolone <marcopaolone@gmail.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -2945,6 +2945,11 @@ msgstr "colore del testo per i nick assenti"
|
||||
msgid "text color for offline nicknames"
|
||||
msgstr "colore del testo per i nick non in linea"
|
||||
|
||||
msgid ""
|
||||
"if enabled, the base word to complete ends at char before cursor; otherwise "
|
||||
"the base word ends at first space after cursor"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"default completion template (please see documentation for template codes and "
|
||||
"values)"
|
||||
|
||||
@@ -21,7 +21,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat 0.3.7-dev\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2011-11-08 17:56+0100\n"
|
||||
"POT-Creation-Date: 2011-11-12 16:06+0100\n"
|
||||
"PO-Revision-Date: 2011-11-03 16:57+0100\n"
|
||||
"Last-Translator: Krzysztof Korościk <soltys@szluug.org>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -2942,6 +2942,11 @@ msgstr "kolor nicków ze statusem nieobecności"
|
||||
msgid "text color for offline nicknames"
|
||||
msgstr "kolor dla nieobecnych nicków"
|
||||
|
||||
msgid ""
|
||||
"if enabled, the base word to complete ends at char before cursor; otherwise "
|
||||
"the base word ends at first space after cursor"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"default completion template (please see documentation for template codes and "
|
||||
"values)"
|
||||
|
||||
+6
-1
@@ -20,7 +20,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat 0.3.7-dev\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2011-11-08 17:56+0100\n"
|
||||
"POT-Creation-Date: 2011-11-12 16:06+0100\n"
|
||||
"PO-Revision-Date: 2011-11-03 16:58+0100\n"
|
||||
"Last-Translator: Ivan Sichmann Freitas <ivansichfreitas@gmail.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -2903,6 +2903,11 @@ msgstr "cor de texto para apelidos ausentes"
|
||||
msgid "text color for offline nicknames"
|
||||
msgstr "cor de texto para apelidos desconectados"
|
||||
|
||||
msgid ""
|
||||
"if enabled, the base word to complete ends at char before cursor; otherwise "
|
||||
"the base word ends at first space after cursor"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"default completion template (please see documentation for template codes and "
|
||||
"values)"
|
||||
|
||||
@@ -20,7 +20,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat 0.3.7-dev\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2011-11-08 17:56+0100\n"
|
||||
"POT-Creation-Date: 2011-11-12 16:06+0100\n"
|
||||
"PO-Revision-Date: 2011-10-22 12:21+0200\n"
|
||||
"Last-Translator: Pavel Shevchuk <stlwrt@gmail.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -2481,6 +2481,11 @@ msgstr "цвет отошедших ников"
|
||||
msgid "text color for offline nicknames"
|
||||
msgstr "цвет отошедших ников"
|
||||
|
||||
msgid ""
|
||||
"if enabled, the base word to complete ends at char before cursor; otherwise "
|
||||
"the base word ends at first space after cursor"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"default completion template (please see documentation for template codes and "
|
||||
"values)"
|
||||
|
||||
+6
-1
@@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2011-11-08 17:56+0100\n"
|
||||
"POT-Creation-Date: 2011-11-12 16:06+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"
|
||||
@@ -2149,6 +2149,11 @@ msgstr ""
|
||||
msgid "text color for offline nicknames"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"if enabled, the base word to complete ends at char before cursor; otherwise "
|
||||
"the base word ends at first space after cursor"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"default completion template (please see documentation for template codes and "
|
||||
"values)"
|
||||
|
||||
@@ -202,6 +202,7 @@ struct t_config_option *config_color_nicklist_offline;
|
||||
|
||||
/* config, completion section */
|
||||
|
||||
struct t_config_option *config_completion_base_word_until_cursor;
|
||||
struct t_config_option *config_completion_default_template;
|
||||
struct t_config_option *config_completion_nick_add_space;
|
||||
struct t_config_option *config_completion_nick_completer;
|
||||
@@ -2427,6 +2428,12 @@ config_weechat_init_options ()
|
||||
return 0;
|
||||
}
|
||||
|
||||
config_completion_base_word_until_cursor = config_file_new_option (
|
||||
weechat_config_file, ptr_section,
|
||||
"base_word_until_cursor", "boolean",
|
||||
N_("if enabled, the base word to complete ends at char before cursor; "
|
||||
"otherwise the base word ends at first space after cursor"),
|
||||
NULL, 0, 0, "on", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
config_completion_default_template = config_file_new_option (
|
||||
weechat_config_file, ptr_section,
|
||||
"default_template", "string",
|
||||
|
||||
@@ -222,6 +222,7 @@ extern struct t_config_option *config_color_nicklist_group;
|
||||
extern struct t_config_option *config_color_nicklist_away;
|
||||
extern struct t_config_option *config_color_nicklist_offline;
|
||||
|
||||
extern struct t_config_option *config_completion_base_word_until_cursor;
|
||||
extern struct t_config_option *config_completion_default_template;
|
||||
extern struct t_config_option *config_completion_nick_add_space;
|
||||
extern struct t_config_option *config_completion_nick_completer;
|
||||
|
||||
@@ -686,12 +686,21 @@ gui_completion_find_context (struct t_gui_completion *completion,
|
||||
}
|
||||
pos_start = i + 1;
|
||||
}
|
||||
i = pos;
|
||||
while ((i < size) && (data[i] != ' '))
|
||||
if (CONFIG_BOOLEAN (config_completion_base_word_until_cursor))
|
||||
{
|
||||
i++;
|
||||
/* base word stops at cursor */
|
||||
pos_end = pos - 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* base word stops after first space found (on or after cursor) */
|
||||
i = pos;
|
||||
while ((i < size) && (data[i] != ' '))
|
||||
{
|
||||
i++;
|
||||
}
|
||||
pos_end = i - 1;
|
||||
}
|
||||
pos_end = i - 1;
|
||||
|
||||
if (completion->context == GUI_COMPLETION_COMMAND)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user