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.
master
Benno Schulenberg 2021-03-01 10:34:48 +01:00
parent d7853df8b6
commit a543f8cd8f
1 changed files with 2 additions and 2 deletions

View File

@ -3544,9 +3544,9 @@ void spotlight_softwrapped(size_t from_col, size_t to_col)
word = display_string(openfile->current->data, from_col, word = display_string(openfile->current->data, from_col,
break_col - from_col, FALSE, FALSE); 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)); waddnstr(edit, word, actual_x(word, break_col));
wattroff(edit, interface_color_pair[SELECTED_TEXT]); wattroff(edit, interface_color_pair[HIGHLIGHTED]);
free(word); free(word);