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-color.c1
-rw-r--r--src/gui/curses/gui-curses-input.c30
2 files changed, 22 insertions, 9 deletions
diff --git a/src/gui/curses/gui-curses-color.c b/src/gui/curses/gui-curses-color.c
index a8fc76fc0..8bf8b2b12 100644
--- a/src/gui/curses/gui-curses-color.c
+++ b/src/gui/curses/gui-curses-color.c
@@ -535,6 +535,7 @@ gui_color_init_weechat ()
gui_color[COLOR_WIN_INPUT_CHANNEL] = gui_color_build (COLOR_WIN_INPUT_CHANNEL, cfg_col_input_channel, cfg_col_input_bg);
gui_color[COLOR_WIN_INPUT_NICK] = gui_color_build (COLOR_WIN_INPUT_NICK, cfg_col_input_nick, cfg_col_input_bg);
gui_color[COLOR_WIN_INPUT_DELIMITERS] = gui_color_build (COLOR_WIN_INPUT_DELIMITERS, cfg_col_input_delimiters, cfg_col_input_bg);
+ gui_color[COLOR_WIN_INPUT_TEXT_NOT_FOUND] = gui_color_build (COLOR_WIN_INPUT_TEXT_NOT_FOUND, cfg_col_input_text_not_found, cfg_col_input_bg);
gui_color[COLOR_WIN_NICK] = gui_color_build (COLOR_WIN_NICK, cfg_col_nick, cfg_col_nick_bg);
gui_color[COLOR_WIN_NICK_AWAY] = gui_color_build (COLOR_WIN_NICK_AWAY, cfg_col_nick_away, cfg_col_nick_bg);
gui_color[COLOR_WIN_NICK_CHANOWNER] = gui_color_build (COLOR_WIN_NICK_CHANOWNER, cfg_col_nick_chanowner, cfg_col_nick_bg);
diff --git a/src/gui/curses/gui-curses-input.c b/src/gui/curses/gui-curses-input.c
index 2c10a0d14..c7fd79734 100644
--- a/src/gui/curses/gui-curses-input.c
+++ b/src/gui/curses/gui-curses-input.c
@@ -284,6 +284,15 @@ gui_input_draw_text (t_gui_window *window, int input_width)
count_cursor = window->buffer->input_buffer_pos -
window->buffer->input_buffer_1st_display;
offset_cursor = 0;
+ if (window->buffer->text_search != TEXT_SEARCH_DISABLED)
+ {
+ if (window->buffer->text_search_found)
+ gui_window_set_weechat_color (GUI_CURSES(window)->win_input,
+ COLOR_WIN_INPUT);
+ else
+ gui_window_set_weechat_color (GUI_CURSES(window)->win_input,
+ COLOR_WIN_INPUT_TEXT_NOT_FOUND);
+ }
while ((input_width > 0) && ptr_start && ptr_start[0])
{
ptr_next = utf8_next_char (ptr_start);
@@ -292,18 +301,21 @@ gui_input_draw_text (t_gui_window *window, int input_width)
saved_char = ptr_next[0];
ptr_next[0] = '\0';
size = ptr_next - ptr_start;
- if (window->buffer->input_buffer_color_mask[pos_mask] != ' ')
- color = window->buffer->input_buffer_color_mask[pos_mask] - '0';
- else
- color = -1;
- if (color != last_color)
+ if (window->buffer->text_search == TEXT_SEARCH_DISABLED)
{
- if (color == -1)
- gui_window_set_weechat_color (GUI_CURSES(window)->win_input, COLOR_WIN_INPUT);
+ if (window->buffer->input_buffer_color_mask[pos_mask] != ' ')
+ color = window->buffer->input_buffer_color_mask[pos_mask] - '0';
else
- gui_input_set_color (window, color);
+ color = -1;
+ if (color != last_color)
+ {
+ if (color == -1)
+ gui_window_set_weechat_color (GUI_CURSES(window)->win_input, COLOR_WIN_INPUT);
+ else
+ gui_input_set_color (window, color);
+ }
+ last_color = color;
}
- last_color = color;
output = weechat_iconv_from_internal (NULL, ptr_start);
wprintw (GUI_CURSES(window)->win_input, "%s", (output) ? output : ptr_start);
if (output)