mirror of
https://github.com/weechat/weechat.git
synced 2026-07-08 18:53:12 +02:00
buffer: add property input_get_any_user_data in buffer (issue #2066)
This allows buffers to get any user input, including commands, that are sent to the buffer callback instead of being executed on the buffer.
This commit is contained in:
@@ -114,22 +114,22 @@ TEST(GuiKey, GetCurrentContext)
|
||||
{
|
||||
LONGS_EQUAL(GUI_KEY_CONTEXT_DEFAULT, gui_key_get_current_context ());
|
||||
|
||||
input_data (gui_buffers, "/cursor", NULL, 0);
|
||||
input_data (gui_buffers, "/cursor", NULL, 0, 0);
|
||||
LONGS_EQUAL(GUI_KEY_CONTEXT_CURSOR, gui_key_get_current_context ());
|
||||
|
||||
input_data (gui_buffers, "/cursor stop", NULL, 0);
|
||||
input_data (gui_buffers, "/cursor stop", NULL, 0, 0);
|
||||
LONGS_EQUAL(GUI_KEY_CONTEXT_DEFAULT, gui_key_get_current_context ());
|
||||
|
||||
input_data (gui_buffers, "/input search_text_here", NULL, 0);
|
||||
input_data (gui_buffers, "/input search_text_here", NULL, 0, 0);
|
||||
LONGS_EQUAL(GUI_KEY_CONTEXT_SEARCH, gui_key_get_current_context ());
|
||||
|
||||
input_data (gui_buffers, "/input search_stop", NULL, 0);
|
||||
input_data (gui_buffers, "/input search_stop", NULL, 0, 0);
|
||||
LONGS_EQUAL(GUI_KEY_CONTEXT_DEFAULT, gui_key_get_current_context ());
|
||||
|
||||
input_data (gui_buffers, "/input search_history", NULL, 0);
|
||||
input_data (gui_buffers, "/input search_history", NULL, 0, 0);
|
||||
LONGS_EQUAL(GUI_KEY_CONTEXT_HISTSEARCH, gui_key_get_current_context ());
|
||||
|
||||
input_data (gui_buffers, "/input search_stop", NULL, 0);
|
||||
input_data (gui_buffers, "/input search_stop", NULL, 0, 0);
|
||||
LONGS_EQUAL(GUI_KEY_CONTEXT_DEFAULT, gui_key_get_current_context ());
|
||||
|
||||
gui_buffers->text_search_where = 0;
|
||||
|
||||
Reference in New Issue
Block a user