vim-patch:8.2.5047: CurSearch highlight is often wrong

Problem:    CurSearch highlight is often wrong.
Solution:   Remember the last highlighted position and redraw when needed.

368137aa52

Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
zeertzjq
2024-06-19 07:42:56 +08:00
parent 14aba67967
commit a2a3e8412e
6 changed files with 54 additions and 2 deletions

View File

@@ -25,7 +25,11 @@ EXTERN bool updating_screen INIT( = false);
/// must_redraw to be set.
EXTERN bool redraw_not_allowed INIT( = false);
EXTERN match_T screen_search_hl INIT( = { 0 }); ///< used for 'hlsearch' highlight matching
/// used for 'hlsearch' highlight matching
EXTERN match_T screen_search_hl INIT( = { 0 });
/// last lnum where CurSearch was displayed
EXTERN linenr_T search_hl_has_cursor_lnum INIT( = 0);
#define W_ENDCOL(wp) ((wp)->w_wincol + (wp)->w_width)
#define W_ENDROW(wp) ((wp)->w_winrow + (wp)->w_height)