mirror of
https://github.com/weechat/weechat.git
synced 2026-06-27 21:36:37 +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:
+2
-1
@@ -412,7 +412,8 @@ gui_input_return (struct t_gui_buffer *buffer)
|
||||
gui_window_bare_display_toggle (NULL);
|
||||
}
|
||||
|
||||
if (buffer->input && (buffer->input_buffer_size > 0))
|
||||
if (buffer->input
|
||||
&& (buffer->input_get_empty || (buffer->input_buffer_size > 0)))
|
||||
{
|
||||
buffer->input_buffer[buffer->input_buffer_size] = '\0';
|
||||
command = strdup (buffer->input_buffer);
|
||||
|
||||
Reference in New Issue
Block a user