mirror of
https://github.com/weechat/weechat.git
synced 2026-07-06 09:43:13 +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) +
|
||||
|
||||
@@ -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).
|
||||
|
||||
Reference in New Issue
Block a user