diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/change.c | 21 | ||||
-rw-r--r-- | src/drawscreen.c | 7 | ||||
-rw-r--r-- | src/main.c | 23 | ||||
-rw-r--r-- | src/testdir/dumps/Test_Xcursorline_13.dump | 2 | ||||
-rw-r--r-- | src/testdir/dumps/Test_Xcursorline_14.dump | 2 | ||||
-rw-r--r-- | src/testdir/dumps/Test_Xcursorline_15.dump | 2 | ||||
-rw-r--r-- | src/testdir/dumps/Test_Xcursorline_16.dump | 2 | ||||
-rw-r--r-- | src/testdir/dumps/Test_Xcursorline_17.dump | 2 | ||||
-rw-r--r-- | src/testdir/dumps/Test_Xcursorline_18.dump | 2 | ||||
-rw-r--r-- | src/version.c | 2 |
10 files changed, 35 insertions, 30 deletions
diff --git a/src/change.c b/src/change.c index da6a72b569..f2542810ef 100644 --- a/src/change.c +++ b/src/change.c @@ -609,16 +609,21 @@ changed_common( if (hasAnyFolding(wp)) set_topline(wp, wp->w_topline); #endif - // Relative numbering may require updating more. Cursor line - // highlighting probably needs to be updated if it's below the - // change (or is using screenline highlighting) - if (wp->w_p_rnu + // Relative numbering may require updating more. + if (wp->w_p_rnu) + redraw_win_later(wp, SOME_VALID); #ifdef FEAT_SYN_HL - || ((wp->w_p_cul && lnum <= wp->w_last_cursorline) - || (wp->w_p_culopt_flags & CULOPT_SCRLINE)) + // Cursor line highlighting probably need to be updated with + // "VALID" if it's below the change. + // If the cursor line is inside the change we need to redraw more. + if (wp->w_p_cul) + { + if (xtra == 0) + redraw_win_later(wp, VALID); + else if (lnum <= wp->w_last_cursorline) + redraw_win_later(wp, SOME_VALID); + } #endif - ) - redraw_win_later(wp, SOME_VALID); } } diff --git a/src/drawscreen.c b/src/drawscreen.c index f6776a1a18..abf34b5e99 100644 --- a/src/drawscreen.c +++ b/src/drawscreen.c @@ -2124,7 +2124,12 @@ win_update(win_T *wp) || (wp->w_match_head != NULL && buf->b_mod_xlines != 0) #endif - ))))) + )))) +#ifdef FEAT_SYN_HL + || (wp->w_p_cul && (lnum == wp->w_cursor.lnum + || lnum == wp->w_last_cursorline)) +#endif + ) { #ifdef FEAT_SEARCH_EXTRA if (lnum == mod_top) diff --git a/src/main.c b/src/main.c index 5545cc48a6..8001c3fbb7 100644 --- a/src/main.c +++ b/src/main.c @@ -1380,27 +1380,20 @@ main_loop( validate_cursor(); #ifdef FEAT_SYN_HL - if (curwin->w_p_cul && curwin->w_p_wrap - && (curwin->w_p_culopt_flags & CULOPT_SCRLINE)) - must_redraw = NOT_VALID; + // Might need to update for 'cursorline'. + // When 'cursorlineopt' is "screenline" need to redraw always. + if (curwin->w_p_cul + && (curwin->w_last_cursorline != curwin->w_cursor.lnum + || (curwin->w_p_culopt_flags & CULOPT_SCRLINE)) + && !char_avail()) + redraw_later(VALID); #endif - if (VIsual_active) update_curbuf(INVERTED); // update inverted part else if (must_redraw) { mch_disable_flush(); // Stop issuing gui_mch_flush(). -#ifdef FEAT_SYN_HL - // Might need some more update for the cursorscreen line. - // TODO: can we optimize this? - if (curwin->w_p_cul - && curwin->w_p_wrap - && (curwin->w_p_culopt_flags & CULOPT_SCRLINE) - && !char_avail()) - update_screen(VALID); - else -#endif - update_screen(0); + update_screen(0); mch_enable_flush(); } else if (redraw_cmdline || clear_cmdline) diff --git a/src/testdir/dumps/Test_Xcursorline_13.dump b/src/testdir/dumps/Test_Xcursorline_13.dump index 6ceb93a800..710cdc9873 100644 --- a/src/testdir/dumps/Test_Xcursorline_13.dump +++ b/src/testdir/dumps/Test_Xcursorline_13.dump @@ -17,4 +17,4 @@ | +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|i+0#0000000&|n|s|-+0#0000e05&|z+0#0000000&|w|e|i|-+0#0000e05&|d+0#0000000&|r|e|i|-+0#0000e05&|v+0#0000000&|i||+1&&|~+0#4040ff13&| @47 | +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|e+0#0000000&|r|-+0#0000e05&|f+0#0000000&|ü|n|f|-+0#0000e05&|s+0#0000000&|e|c|h|s|@+0#4040ff13&@2||+1#0000000&|~+0#4040ff13&| @47 |<+3#0000000&|o| |N|a|m|e|]| |[|+|]| |1|,|1| @5|T|o|p| |[+1&&|N|o| |N|a|m|e|]| |[|+|]| @17|5|,|0|-|1| @9|B|o|t -|:+0&&|s|e|t| |b|r|e|a|k|i|n|d|e|n|t| |f|o|l|d|c|o|l|u|m|n|=|2| |s|i|g|n|c|o|l|u|m|n|=|y|e|s| @30 +| +0&&@74 diff --git a/src/testdir/dumps/Test_Xcursorline_14.dump b/src/testdir/dumps/Test_Xcursorline_14.dump index e7379536a6..fb8d56cdb1 100644 --- a/src/testdir/dumps/Test_Xcursorline_14.dump +++ b/src/testdir/dumps/Test_Xcursorline_14.dump @@ -17,4 +17,4 @@ | +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|i+0#0000000&|n|s|-+0#0000e05&|z+0#0000000&|w|e|i|-+0#0000e05&|d+0#0000000&|r|e|i|-+0#0000e05&|v+0#0000000&|i||+1&&|~+0#4040ff13&| @47 | +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|e+0#0000000&|r|-+0#0000e05&|f+0#0000000&|ü|n|f|-+0#0000e05&|s+0#0000000&|e|c|h|s|@+0#4040ff13&@2||+1#0000000&|~+0#4040ff13&| @47 |<+3#0000000&|o| |N|a|m|e|]| |[|+|]| |1|,|2|6|-|3|0| @1|T|o|p| |[+1&&|N|o| |N|a|m|e|]| |[|+|]| @17|5|,|0|-|1| @9|B|o|t -|:+0&&|s|e|t| |b|r|e|a|k|i|n|d|e|n|t| |f|o|l|d|c|o|l|u|m|n|=|2| |s|i|g|n|c|o|l|u|m|n|=|y|e|s| @30 +| +0&&@74 diff --git a/src/testdir/dumps/Test_Xcursorline_15.dump b/src/testdir/dumps/Test_Xcursorline_15.dump index b7ae563bb7..1470bf7d66 100644 --- a/src/testdir/dumps/Test_Xcursorline_15.dump +++ b/src/testdir/dumps/Test_Xcursorline_15.dump @@ -17,4 +17,4 @@ | +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|i+0#0000000&|n|s|-+0#0000e05&|z+0#0000000&|w|e|i|-+0#0000e05&|d+0#0000000&|r|e|i|-+0#0000e05&|v+0#0000000&|i||+1&&|~+0#4040ff13&| @47 | +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|e+0#0000000&|r|-+0#0000e05&|f+0#0000000&|ü|n|f|-+0#0000e05&|s+0#0000000&|e|c|h|s|@+0#4040ff13&@2||+1#0000000&|~+0#4040ff13&| @47 |<+3#0000000&|o| |N|a|m|e|]| |[|+|]| |1|,|4|3|-|4|7| @1|T|o|p| |[+1&&|N|o| |N|a|m|e|]| |[|+|]| @17|5|,|0|-|1| @9|B|o|t -|:+0&&|s|e|t| |b|r|e|a|k|i|n|d|e|n|t| |f|o|l|d|c|o|l|u|m|n|=|2| |s|i|g|n|c|o|l|u|m|n|=|y|e|s| @30 +| +0&&@74 diff --git a/src/testdir/dumps/Test_Xcursorline_16.dump b/src/testdir/dumps/Test_Xcursorline_16.dump index b59e24a524..e2b41fe07b 100644 --- a/src/testdir/dumps/Test_Xcursorline_16.dump +++ b/src/testdir/dumps/Test_Xcursorline_16.dump @@ -17,4 +17,4 @@ | +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|i+0#0000000&|n|s|-+0#0000e05&|z+0#0000000&|w|e|i|-+0#0000e05&|d+0#0000000&|r|e|i|-+0#0000e05&|v+0#0000000&|i||+1&&|~+0#4040ff13&| @47 | +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|e+0#0000000&|r|-+0#0000e05&|f+0#0000000&|ü|n|f|-+0#0000e05&|s+0#0000000&|e|c|h|s|@+0#4040ff13&@2||+1#0000000&|~+0#4040ff13&| @47 |<+3#0000000&|o| |N|a|m|e|]| |[|+|]| |1|,|5|9|-|6|4| @1|T|o|p| |[+1&&|N|o| |N|a|m|e|]| |[|+|]| @17|5|,|0|-|1| @9|B|o|t -|:+0&&|s|e|t| |b|r|e|a|k|i|n|d|e|n|t| |f|o|l|d|c|o|l|u|m|n|=|2| |s|i|g|n|c|o|l|u|m|n|=|y|e|s| @30 +| +0&&@74 diff --git a/src/testdir/dumps/Test_Xcursorline_17.dump b/src/testdir/dumps/Test_Xcursorline_17.dump index 8f41c90223..47344c7cbe 100644 --- a/src/testdir/dumps/Test_Xcursorline_17.dump +++ b/src/testdir/dumps/Test_Xcursorline_17.dump @@ -17,4 +17,4 @@ | +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|i+0#0000000&|n|s|-+0#0000e05&|z+0#0000000&|w|e|i|-+0#0000e05&|d+0#0000000&|r|e|i|-+0#0000e05&|v+0#0000000&|i||+1&&|~+0#4040ff13&| @47 | +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|e+0#0000000&|r|-+0#0000e05&|f+0#0000000&|ü|n|f|-+0#0000e05&|s+0#0000000&|e|c|h|s|@+0#4040ff13&@2||+1#0000000&|~+0#4040ff13&| @47 |<+3#0000000&|o| |N|a|m|e|]| |[|+|]| |1|,|7|5|-|8|1| @1|T|o|p| |[+1&&|N|o| |N|a|m|e|]| |[|+|]| @17|5|,|0|-|1| @9|B|o|t -|:+0&&|s|e|t| |b|r|e|a|k|i|n|d|e|n|t| |f|o|l|d|c|o|l|u|m|n|=|2| |s|i|g|n|c|o|l|u|m|n|=|y|e|s| @30 +| +0&&@74 diff --git a/src/testdir/dumps/Test_Xcursorline_18.dump b/src/testdir/dumps/Test_Xcursorline_18.dump index 974cea3631..cea6538eec 100644 --- a/src/testdir/dumps/Test_Xcursorline_18.dump +++ b/src/testdir/dumps/Test_Xcursorline_18.dump @@ -17,4 +17,4 @@ | +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|i+0#0000000&|n|s|-+0#0000e05&|z+0#0000000&|w|e|i|-+0#0000e05&|d+0#0000000&|r|e|i|-+0#0000e05&|v+0#0000000&|i||+1&&|~+0#4040ff13&| @47 | +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|e+0#0000000&|r|-+0#0000e05&|f+0#0000000&|ü|n|f|-+0#0000e05&|s+0#0000000&|e|c|h|s|@+0#4040ff13&@2||+1#0000000&|~+0#4040ff13&| @47 |<+3#0000000&|o| |N|a|m|e|]| |[|+|]| |1|,|9|1|-|9|8| @1|T|o|p| |[+1&&|N|o| |N|a|m|e|]| |[|+|]| @17|5|,|0|-|1| @9|B|o|t -|:+0&&|s|e|t| |b|r|e|a|k|i|n|d|e|n|t| |f|o|l|d|c|o|l|u|m|n|=|2| |s|i|g|n|c|o|l|u|m|n|=|y|e|s| @30 +| +0&&@74 diff --git a/src/version.c b/src/version.c index 4cd05a8744..77ce139f87 100644 --- a/src/version.c +++ b/src/version.c @@ -742,6 +742,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 2214, +/**/ 2213, /**/ 2212, |