diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2013-08-17 11:51:50 +0200 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2013-08-17 11:51:50 +0200 |
commit | 600ee3ddf37c070cab373346661d55718d2130b9 (patch) | |
tree | ff8c99c98ed7c4371eb4a6641a056d9b28ac6c71 /src/gui/curses/gui-curses-chat.c | |
parent | c6249603368de12acfac60868d4bddd18d29abba (diff) | |
download | weechat-600ee3ddf37c070cab373346661d55718d2130b9.zip |
core: add search of regular expression in buffer, don't reset search type on a new search, select where to search (messages/prefixes)
Key changed in search context:
- ctrl+"r": switch search type: string/regex
New keys in search context:
- alt+"c": case (in)sensitive search
- tab: search in messages/prefixes/both
Diffstat (limited to 'src/gui/curses/gui-curses-chat.c')
-rw-r--r-- | src/gui/curses/gui-curses-chat.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/gui/curses/gui-curses-chat.c b/src/gui/curses/gui-curses-chat.c index e28dc92a6..b62dc52ff 100644 --- a/src/gui/curses/gui-curses-chat.c +++ b/src/gui/curses/gui-curses-chat.c @@ -1201,12 +1201,15 @@ 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) + if ((window->buffer->text_search != GUI_TEXT_SEARCH_DISABLED) + && (window->buffer->text_search_where & GUI_TEXT_SEARCH_IN_MESSAGE) + && (!window->buffer->text_search_regex + || window->buffer->text_search_regex_compiled)) { message_with_search = gui_color_emphasize (ptr_data, window->buffer->input_buffer, window->buffer->text_search_exact, - NULL); + window->buffer->text_search_regex_compiled); if (message_with_search) ptr_data = message_with_search; } @@ -1321,8 +1324,7 @@ gui_chat_display_line (struct t_gui_window *window, struct t_gui_line *line, /* display marker if line is matching user search */ if (window->buffer->text_search != GUI_TEXT_SEARCH_DISABLED) { - if (gui_line_search_text (line, window->buffer->input_buffer, - window->buffer->text_search_exact)) + if (gui_line_search_text (window->buffer, line)) { gui_window_set_weechat_color (GUI_WINDOW_OBJECTS(window)->win_chat, GUI_COLOR_CHAT_TEXT_FOUND); |