diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2023-11-07 07:22:01 +0100 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2023-11-11 08:54:06 +0100 |
commit | b83b428c5cc48043cb625844b87e94acbc194ba1 (patch) | |
tree | 4d8bb1ec0d2fa9e5f40425f4ed99d81a2d37be7c /src/gui/curses/gui-curses-chat.c | |
parent | b2ce312e82614774e9861d50b9b62927ab767a2b (diff) | |
download | weechat-b83b428c5cc48043cb625844b87e94acbc194ba1.zip |
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"
Diffstat (limited to 'src/gui/curses/gui-curses-chat.c')
-rw-r--r-- | src/gui/curses/gui-curses-chat.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gui/curses/gui-curses-chat.c b/src/gui/curses/gui-curses-chat.c index bc2fb99c6..cfdfd2f9b 100644 --- a/src/gui/curses/gui-curses-chat.c +++ b/src/gui/curses/gui-curses-chat.c @@ -1505,8 +1505,8 @@ gui_chat_display_line (struct t_gui_window *window, struct t_gui_line *line, ptr_data = (message_with_tags) ? message_with_tags : line->data->message; message_with_search = NULL; - if ((window->buffer->text_search != GUI_TEXT_SEARCH_DISABLED) - && (window->buffer->text_search_where & GUI_TEXT_SEARCH_IN_MESSAGE) + if ((window->buffer->text_search == GUI_BUFFER_SEARCH_LINES) + && (window->buffer->text_search_where & GUI_BUFFER_SEARCH_IN_MESSAGE) && (!window->buffer->text_search_regex || window->buffer->text_search_regex_compiled)) { @@ -1695,7 +1695,7 @@ gui_chat_display_line (struct t_gui_window *window, struct t_gui_line *line, else { /* display marker if line is matching user search */ - if (window->buffer->text_search != GUI_TEXT_SEARCH_DISABLED) + if (window->buffer->text_search == GUI_BUFFER_SEARCH_LINES) { if (gui_line_search_text (window->buffer, line)) { @@ -1765,8 +1765,8 @@ gui_chat_display_line_y (struct t_gui_window *window, struct t_gui_line *line, } /* emphasize text (if searching text) */ - if ((window->buffer->text_search != GUI_TEXT_SEARCH_DISABLED) - && (window->buffer->text_search_where & GUI_TEXT_SEARCH_IN_MESSAGE) + if ((window->buffer->text_search == GUI_BUFFER_SEARCH_LINES) + && (window->buffer->text_search_where & GUI_BUFFER_SEARCH_IN_MESSAGE) && (!window->buffer->text_search_regex || window->buffer->text_search_regex_compiled)) { |