commit a543f8cd8f5b8a1471e71b04afd351c7d33f57ad
parent d7853df8b6e791769ed1b81d679e94becafb8a76
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Mon, 1 Mar 2021 10:34:48 +0100
search: correctly colorize a match also when softwrapping is active
This fixes https://savannah.gnu.org/bugs/?60149.
Reported-by: Peter Passchier <peter@passchier.net>
Reported-by: Liu Hao <lh_mouse@126.com>
Bug existed since version 5.6, since a special color for highlighting
search matches was introduced in commit 87fe73dd.
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/winio.c b/src/winio.c
@@ -3544,9 +3544,9 @@ void spotlight_softwrapped(size_t from_col, size_t to_col)
word = display_string(openfile->current->data, from_col,
break_col - from_col, FALSE, FALSE);
- wattron(edit, interface_color_pair[SELECTED_TEXT]);
+ wattron(edit, interface_color_pair[HIGHLIGHTED]);
waddnstr(edit, word, actual_x(word, break_col));
- wattroff(edit, interface_color_pair[SELECTED_TEXT]);
+ wattroff(edit, interface_color_pair[HIGHLIGHTED]);
free(word);