mirror of
https://github.com/weechat/weechat.git
synced 2026-06-29 14:26:39 +02:00
core: add flag "input_get_empty" in buffer
The default value is 0 (legacy behavior). When it is set to 1, an empty input (just by pressing Return with nothing in input) is sent to the input callback, which receives an empty string.
This commit is contained in:
@@ -534,6 +534,7 @@ _input_callback_ (pointer) +
|
||||
_input_callback_pointer_ (pointer) +
|
||||
_input_callback_data_ (pointer) +
|
||||
_input_get_unknown_commands_ (integer) +
|
||||
_input_get_empty_ (integer) +
|
||||
_input_buffer_ (string) +
|
||||
_input_buffer_alloc_ (integer) +
|
||||
_input_buffer_size_ (integer) +
|
||||
|
||||
@@ -534,6 +534,7 @@ _input_callback_ (pointer) +
|
||||
_input_callback_pointer_ (pointer) +
|
||||
_input_callback_data_ (pointer) +
|
||||
_input_get_unknown_commands_ (integer) +
|
||||
_input_get_empty_ (integer) +
|
||||
_input_buffer_ (string) +
|
||||
_input_buffer_alloc_ (integer) +
|
||||
_input_buffer_size_ (integer) +
|
||||
|
||||
@@ -11801,6 +11801,7 @@ Arguments:
|
||||
** _input_: 1 if input is enabled, otherwise 0
|
||||
** _input_get_unknown_commands_: 1 if unknown commands are sent to input
|
||||
callback, otherwise 0
|
||||
** _input_get_empty_: 1 if empty input is sent to input callback, otherwise 0
|
||||
** _input_size_: input size (in bytes)
|
||||
** _input_length_: input length (number of chars)
|
||||
** _input_pos_: cursor position in buffer input
|
||||
@@ -12099,6 +12100,9 @@ Properties:
|
||||
get unknown commands, for example if user type "/unknowncmd", buffer will
|
||||
receive it (no error about unknown command).
|
||||
|
||||
| input_get_empty | "0" or "1" |
|
||||
"0" to disable empty input on this buffer (default behavior), "1" to get empty input.
|
||||
|
||||
| localvar_set_xxx | any string |
|
||||
Set new value for local variable _xxx_ (variable is created if it does not
|
||||
exist).
|
||||
|
||||
@@ -534,6 +534,7 @@ _input_callback_ (pointer) +
|
||||
_input_callback_pointer_ (pointer) +
|
||||
_input_callback_data_ (pointer) +
|
||||
_input_get_unknown_commands_ (integer) +
|
||||
_input_get_empty_ (integer) +
|
||||
_input_buffer_ (string) +
|
||||
_input_buffer_alloc_ (integer) +
|
||||
_input_buffer_size_ (integer) +
|
||||
|
||||
@@ -12048,6 +12048,8 @@ Paramètres :
|
||||
** _input_ : 1 si la zone de saisie est activée, sinon 0
|
||||
** _input_get_unknown_commands_ : 1 si les commandes inconnues sont envoyées
|
||||
à la fonction de rappel "input", sinon 0
|
||||
** _input_get_empty_ : 1 si une entrée vide est envoyée à la fonction de rappel
|
||||
"input", sinon 0
|
||||
** _input_size_ : taille de la zone de saisie (en octets)
|
||||
** _input_length_ : longueur de la zone de saisie (nombre de caractères)
|
||||
** _input_pos_ : position du curseur dans la zone de saisie
|
||||
@@ -12359,6 +12361,10 @@ Propriétés :
|
||||
l'utilisateur tape "/commandeinconnue", le tampon le recevra (pas d'erreur
|
||||
sur la commande inconnue).
|
||||
|
||||
| input_get_empty | "0" ou "1" |
|
||||
"0" pour désactiver l'entrée vide sur ce tampon (comportement par défaut),
|
||||
"1" pour recevoir l'entrée vide.
|
||||
|
||||
| localvar_set_xxx | toute chaîne |
|
||||
Change la valeur de la variable locale _xxx_ (la variable est créée si elle
|
||||
n'existe pas).
|
||||
|
||||
@@ -534,6 +534,7 @@ _input_callback_ (pointer) +
|
||||
_input_callback_pointer_ (pointer) +
|
||||
_input_callback_data_ (pointer) +
|
||||
_input_get_unknown_commands_ (integer) +
|
||||
_input_get_empty_ (integer) +
|
||||
_input_buffer_ (string) +
|
||||
_input_buffer_alloc_ (integer) +
|
||||
_input_buffer_size_ (integer) +
|
||||
|
||||
@@ -12260,6 +12260,8 @@ Argomenti:
|
||||
** _input_: 1 se l'input è abilitato, altrimenti 0
|
||||
** _input_get_unknown_commands_: 1 se i comandi sconosciuti vengono inviati
|
||||
alla callback di input, altrimenti 0
|
||||
// TRANSLATION MISSING
|
||||
** _input_get_empty_: 1 if empty input is sent to input callback, otherwise 0
|
||||
** _input_size_: dimensione per l'input (in byte)
|
||||
** _input_length_: lunghezza dell'input (numero di caratteri)
|
||||
** _input_pos_: posizione del cursore nell'input del buffer
|
||||
@@ -12585,6 +12587,10 @@ Properties:
|
||||
digita "/unknowncmd", verrà ricevuto dal buffer (nessun errore riguardo il
|
||||
comando sconosciuto).
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| input_get_empty | "0" oppure "1" |
|
||||
"0" to disable empty input on this buffer (default behavior), "1" to get empty input.
|
||||
|
||||
| localvar_set_xxx | qualsiasi stringa |
|
||||
Imposta il nuovo valore per la variabile locale _xxx_ (la variabile verrà
|
||||
creata se non esiste).
|
||||
|
||||
@@ -534,6 +534,7 @@ _input_callback_ (pointer) +
|
||||
_input_callback_pointer_ (pointer) +
|
||||
_input_callback_data_ (pointer) +
|
||||
_input_get_unknown_commands_ (integer) +
|
||||
_input_get_empty_ (integer) +
|
||||
_input_buffer_ (string) +
|
||||
_input_buffer_alloc_ (integer) +
|
||||
_input_buffer_size_ (integer) +
|
||||
|
||||
@@ -11805,6 +11805,8 @@ int weechat_buffer_get_integer (struct t_gui_buffer *buffer,
|
||||
** _input_: 入力可能な場合は 1、そうでない場合は 0
|
||||
** _input_get_unknown_commands_: 未定義のコマンドを入力コールバックに送信する場合は
|
||||
1、そうでない場合は 0
|
||||
// TRANSLATION MISSING
|
||||
** _input_get_empty_: 1 if empty input is sent to input callback, otherwise 0
|
||||
** _input_size_: 入力サイズ (バイト単位)
|
||||
** _input_length_: 入力長 (文字数)
|
||||
** _input_pos_: バッファ入力におけるカーソル位置
|
||||
@@ -12101,6 +12103,10 @@ void weechat_buffer_set (struct t_gui_buffer *buffer, const char *property,
|
||||
(デフォルト)、未定義のコマンドを受け入れる場合は "1"、例えばユーザが "/unknowncmd"
|
||||
を入力した場合、バッファはこれを受け入れる (未定義のコマンドに対するエラーを出さない)
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| input_get_empty | "0" または "1" |
|
||||
"0" to disable empty input on this buffer (default behavior), "1" to get empty input.
|
||||
|
||||
| localvar_set_xxx | 任意の文字列 |
|
||||
ローカル変数 _xxx_ の新しい値を設定
|
||||
(存在しない変数の場合は変数を作成する)
|
||||
|
||||
@@ -534,6 +534,7 @@ _input_callback_ (pointer) +
|
||||
_input_callback_pointer_ (pointer) +
|
||||
_input_callback_data_ (pointer) +
|
||||
_input_get_unknown_commands_ (integer) +
|
||||
_input_get_empty_ (integer) +
|
||||
_input_buffer_ (string) +
|
||||
_input_buffer_alloc_ (integer) +
|
||||
_input_buffer_size_ (integer) +
|
||||
|
||||
Reference in New Issue
Block a user