summaryrefslogtreecommitdiff
path: root/src/gui/curses
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/curses')
-rw-r--r--src/gui/curses/gui-curses-chat.c30
-rw-r--r--src/gui/curses/gui-curses-input.c10
-rw-r--r--src/gui/curses/gui-curses-keyboard.c11
3 files changed, 32 insertions, 19 deletions
diff --git a/src/gui/curses/gui-curses-chat.c b/src/gui/curses/gui-curses-chat.c
index 4cc32ed0c..f0821cea1 100644
--- a/src/gui/curses/gui-curses-chat.c
+++ b/src/gui/curses/gui-curses-chat.c
@@ -812,14 +812,30 @@ gui_chat_display_line (t_gui_window *window, t_gui_line *line, int count,
}
else
{
- /* display read marker if needed */
- if (cfg_look_read_marker && cfg_look_read_marker[0] &&
- window->buffer->last_read_line &&
- (window->buffer->last_read_line == line->prev_line))
+ if (cfg_look_read_marker && cfg_look_read_marker[0])
{
- gui_chat_set_weechat_color (window, COLOR_WIN_CHAT_READ_MARKER);
- mvwprintw (GUI_CURSES(window)->win_chat, read_marker_y, read_marker_x,
- "%c", cfg_look_read_marker[0]);
+ /* display marker if line is matching user search */
+ if (window->buffer->text_search != TEXT_SEARCH_DISABLED)
+ {
+ if (gui_buffer_line_search (line, window->buffer->input_buffer,
+ window->buffer->text_search_exact))
+ {
+ gui_chat_set_weechat_color (window, COLOR_WIN_CHAT_READ_MARKER);
+ mvwprintw (GUI_CURSES(window)->win_chat, read_marker_y, read_marker_x,
+ "%c", cfg_look_read_marker[0]);
+ }
+ }
+ else
+ {
+ /* display read marker if needed */
+ if (window->buffer->last_read_line &&
+ (window->buffer->last_read_line == line->prev_line))
+ {
+ gui_chat_set_weechat_color (window, COLOR_WIN_CHAT_READ_MARKER);
+ mvwprintw (GUI_CURSES(window)->win_chat, read_marker_y, read_marker_x,
+ "%c", cfg_look_read_marker[0]);
+ }
+ }
}
}
diff --git a/src/gui/curses/gui-curses-input.c b/src/gui/curses/gui-curses-input.c
index fb715cf47..2c10a0d14 100644
--- a/src/gui/curses/gui-curses-input.c
+++ b/src/gui/curses/gui-curses-input.c
@@ -79,7 +79,12 @@ gui_input_get_prompt_length (t_gui_window *window, char *nick)
int char_size, length;
if (window->buffer->text_search != TEXT_SEARCH_DISABLED)
- return utf8_width_screen (_("Text search: "));
+ {
+ if (window->buffer->text_search_exact)
+ return utf8_width_screen (_("Text search (exact): "));
+ else
+ return utf8_width_screen (_("Text search: "));
+ }
length = 0;
pos = cfg_look_input_format;
@@ -161,7 +166,8 @@ gui_input_draw_prompt (t_gui_window *window, char *nick)
gui_window_set_weechat_color (GUI_CURSES(window)->win_input,
COLOR_WIN_INPUT);
wprintw (GUI_CURSES(window)->win_input, "%s",
- _("Text search: "));
+ (window->buffer->text_search_exact) ?
+ _("Text search (exact): ") : _("Text search: "));
return;
}
diff --git a/src/gui/curses/gui-curses-keyboard.c b/src/gui/curses/gui-curses-keyboard.c
index 94e1ec84b..4d2ac79ae 100644
--- a/src/gui/curses/gui-curses-keyboard.c
+++ b/src/gui/curses/gui-curses-keyboard.c
@@ -304,16 +304,7 @@ gui_keyboard_read ()
if ((gui_current_window->buffer->text_search != TEXT_SEARCH_DISABLED)
&& ((input_old == NULL) || (gui_current_window->buffer->input_buffer == NULL)
|| (strcmp (input_old, gui_current_window->buffer->input_buffer) != 0)))
- {
- gui_current_window->start_line = NULL;
- gui_current_window->start_line_pos = 0;
- gui_current_window->buffer->text_search = TEXT_SEARCH_BACKWARD;
- if (!gui_buffer_search_text (gui_current_window))
- {
- gui_chat_draw (gui_current_window->buffer, 1);
- gui_status_draw (gui_current_window->buffer, 1);
- }
- }
+ gui_buffer_search_restart (gui_current_window);
if (input_old)
free (input_old);