1
0
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:
Sébastien Helleu
2024-04-02 19:12:44 +02:00
parent 3cce916035
commit 4adb64284b
24 changed files with 197 additions and 45 deletions
+6 -6
View File
@@ -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;