1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-29 14:26:39 +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
+7 -1
View File
@@ -583,12 +583,15 @@ TEST(GuiBuffer, NewProps)
POINTERS_EQUAL(NULL, buffer->last_history);
POINTERS_EQUAL(NULL, buffer->ptr_history);
LONGS_EQUAL(0, buffer->num_history);
LONGS_EQUAL(GUI_TEXT_SEARCH_DISABLED, buffer->text_search);
LONGS_EQUAL(GUI_BUFFER_SEARCH_DISABLED, buffer->text_search);
LONGS_EQUAL(GUI_BUFFER_SEARCH_DIR_BACKWARD, buffer->text_search_direction);
LONGS_EQUAL(0, buffer->text_search_exact);
LONGS_EQUAL(0, buffer->text_search_regex);
POINTERS_EQUAL(NULL, buffer->text_search_regex_compiled);
LONGS_EQUAL(0, buffer->text_search_where);
LONGS_EQUAL(0, buffer->text_search_history);
LONGS_EQUAL(0, buffer->text_search_found);
POINTERS_EQUAL(NULL, buffer->text_search_ptr_history);
POINTERS_EQUAL(NULL, buffer->text_search_input);
POINTERS_EQUAL(NULL, buffer->highlight_words);
POINTERS_EQUAL(NULL, buffer->highlight_regex);
@@ -885,9 +888,11 @@ TEST(GuiBuffer, GetInteger)
LONGS_EQUAL(0, gui_buffer_get_integer (gui_buffers, "input_1st_display"));
CHECK(gui_buffer_get_integer (gui_buffers, "num_history") >= 0);
LONGS_EQUAL(0, gui_buffer_get_integer (gui_buffers, "text_search"));
LONGS_EQUAL(0, gui_buffer_get_integer (gui_buffers, "text_search_direction"));
LONGS_EQUAL(0, gui_buffer_get_integer (gui_buffers, "text_search_exact"));
LONGS_EQUAL(0, gui_buffer_get_integer (gui_buffers, "text_search_regex"));
LONGS_EQUAL(0, gui_buffer_get_integer (gui_buffers, "text_search_where"));
LONGS_EQUAL(0, gui_buffer_get_integer (gui_buffers, "text_search_history"));
LONGS_EQUAL(0, gui_buffer_get_integer (gui_buffers, "text_search_found"));
}
@@ -931,6 +936,7 @@ TEST(GuiBuffer, GetPointer)
POINTERS_EQUAL(NULL, gui_buffer_get_pointer (gui_buffers, "plugin"));
POINTERS_EQUAL(NULL, gui_buffer_get_pointer (gui_buffers, "text_search_regex_compiled"));
POINTERS_EQUAL(NULL, gui_buffer_get_pointer (gui_buffers, "text_search_ptr_history"));
POINTERS_EQUAL(NULL, gui_buffer_get_pointer (gui_buffers, "highlight_disable_regex_compiled"));
POINTERS_EQUAL(NULL, gui_buffer_get_pointer (gui_buffers, "highlight_regex_compiled"));
}