comparison src/match.c @ 29050:a2710736125a v8.2.5047

patch 8.2.5047: CurSearch highlight is often wrong Commit: https://github.com/vim/vim/commit/368137aa525982984beed73940af481ac53a62af Author: Bram Moolenaar <Bram@vim.org> Date: Tue May 31 13:43:12 2022 +0100 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.
author Bram Moolenaar <Bram@vim.org>
date Tue, 31 May 2022 14:45:03 +0200
parents 3a16a350614f
children b90bca860b5a
comparison
equal deleted inserted replaced
29049:947c2f51b6f7 29050:a2710736125a
796 *has_match_conc = 0; 796 *has_match_conc = 0;
797 # endif 797 # endif
798 // Highlight the match were the cursor is using the CurSearch 798 // Highlight the match were the cursor is using the CurSearch
799 // group. 799 // group.
800 if (shl == search_hl && shl->has_cursor) 800 if (shl == search_hl && shl->has_cursor)
801 {
801 shl->attr_cur = HL_ATTR(HLF_LC); 802 shl->attr_cur = HL_ATTR(HLF_LC);
803 if (shl->attr_cur != shl->attr)
804 search_hl_has_cursor_lnum = lnum;
805 }
802 806
803 } 807 }
804 else if (col == shl->endcol) 808 else if (col == shl->endcol)
805 { 809 {
806 shl->attr_cur = 0; 810 shl->attr_cur = 0;