1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-10 03:33:12 +02:00

core: add incremental search in commands history (issue #2040)

Changes:

- move key ctrl+r to ctrl+s
- add key ctrl+r to search in commands history
- add option `search_history` in command `/input`
- add key context "histsearch"
- add option weechat.look.buffer_search_history
- add buffer variables "text_search_direction", "text_search_history" and "text_search_ptr_history"
This commit is contained in:
Sébastien Helleu
2023-11-07 07:22:01 +01:00
parent b2ce312e82
commit b83b428c5c
38 changed files with 1311 additions and 386 deletions
+10 -2
View File
@@ -100,8 +100,9 @@ TEST(GuiKey, SearchContext)
LONGS_EQUAL(0, gui_key_search_context ("default"));
LONGS_EQUAL(1, gui_key_search_context ("search"));
LONGS_EQUAL(2, gui_key_search_context ("cursor"));
LONGS_EQUAL(3, gui_key_search_context ("mouse"));
LONGS_EQUAL(2, gui_key_search_context ("histsearch"));
LONGS_EQUAL(3, gui_key_search_context ("cursor"));
LONGS_EQUAL(4, gui_key_search_context ("mouse"));
}
/*
@@ -125,7 +126,14 @@ TEST(GuiKey, GetCurrentContext)
input_data (gui_buffers, "/input search_stop", NULL, 0);
LONGS_EQUAL(GUI_KEY_CONTEXT_DEFAULT, gui_key_get_current_context ());
input_data (gui_buffers, "/input search_history", NULL, 0);
LONGS_EQUAL(GUI_KEY_CONTEXT_HISTSEARCH, gui_key_get_current_context ());
input_data (gui_buffers, "/input search_stop", NULL, 0);
LONGS_EQUAL(GUI_KEY_CONTEXT_DEFAULT, gui_key_get_current_context ());
gui_buffers->text_search_where = 0;
gui_buffers->text_search_history = GUI_BUFFER_SEARCH_HISTORY_NONE;
}
/*