summaryrefslogtreecommitdiffstats
path: root/src/drawscreen.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-07-22 21:33:03 +0200
committerBram Moolenaar <Bram@vim.org>2021-07-22 21:33:03 +0200
commitc9e7e344ed390d2a22afb88001b6aa80832d2541 (patch)
treeb2431a8a3b934783e302317653c5c3b4a6f2e8c9 /src/drawscreen.c
parentcd268017cf79a546a494883b4b026a3cbbd9a8a0 (diff)
patch 8.2.3204: display garbled when 'cursorline' is set and lines wrapv8.2.3204
Problem: Display garbled when 'cursorline' is set and lines wrap. (Gabriel Dupras) Solution: Avoid inserting lines twice.
Diffstat (limited to 'src/drawscreen.c')
-rw-r--r--src/drawscreen.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/drawscreen.c b/src/drawscreen.c
index 44c2dc52ba..49615bda60 100644
--- a/src/drawscreen.c
+++ b/src/drawscreen.c
@@ -2249,9 +2249,11 @@ win_update(win_T *wp)
// up or down to minimize redrawing.
// Don't do this when the change continues until the end.
// Don't scroll when dollar_vcol >= 0, keep the "$".
+ // Don't scroll when redrawing the top, scrolled already above.
if (lnum == mod_top
&& mod_bot != MAXLNUM
- && !(dollar_vcol >= 0 && mod_bot == mod_top + 1))
+ && !(dollar_vcol >= 0 && mod_bot == mod_top + 1)
+ && row >= top_end)
{
int old_rows = 0;
int new_rows = 0;