diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-05-31 13:43:12 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-05-31 13:43:12 +0100 |
commit | 368137aa525982984beed73940af481ac53a62af (patch) | |
tree | 6b6c9fc6b00fb7ed3fb71bb3b53d01f62f8e981a /src/match.c | |
parent | 4aaf3e7f4db599932d01d87e5bbcdc342cccee27 (diff) | |
download | vim-git-368137aa525982984beed73940af481ac53a62af.tar.gz |
patch 8.2.5047: CurSearch highlight is often wrongv8.2.5047
Problem: CurSearch highlight is often wrong.
Solution: Remember the last highlighted position and redraw when needed.
Diffstat (limited to 'src/match.c')
-rw-r--r-- | src/match.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/match.c b/src/match.c index 1078424af..8280da7d5 100644 --- a/src/match.c +++ b/src/match.c @@ -798,7 +798,11 @@ update_search_hl( // Highlight the match were the cursor is using the CurSearch // group. if (shl == search_hl && shl->has_cursor) + { shl->attr_cur = HL_ATTR(HLF_LC); + if (shl->attr_cur != shl->attr) + search_hl_has_cursor_lnum = lnum; + } } else if (col == shl->endcol) |