From a543f8cd8f5b8a1471e71b04afd351c7d33f57ad Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Mon, 1 Mar 2021 10:34:48 +0100 Subject: [PATCH] search: correctly colorize a match also when softwrapping is active This fixes https://savannah.gnu.org/bugs/?60149. Reported-by: Peter Passchier Reported-by: Liu Hao Bug existed since version 5.6, since a special color for highlighting search matches was introduced in commit 87fe73dd. --- src/winio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/winio.c b/src/winio.c index 5af964ac..8f16e6b1 100644 --- 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);