summaryrefslogtreecommitdiffstats
path: root/src/drawscreen.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-08-19 20:19:48 +0200
committerBram Moolenaar <Bram@vim.org>2020-08-19 20:19:48 +0200
commit9dc1917f42b23277e143fc58bbe27482b0b76bad (patch)
treede77449754a2aef749915aa6929ff1f2138f90ea /src/drawscreen.c
parenta7c4e747639ad7642cd50ed577ff4c93db200df4 (diff)
patch 8.2.1488: text does not scroll when inserting above first linev8.2.1488
Problem: Text does not scroll when inserting above first line. Solution: Adjust off-by-one error. (Ken Takata, closes #6739)
Diffstat (limited to 'src/drawscreen.c')
-rw-r--r--src/drawscreen.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/drawscreen.c b/src/drawscreen.c
index 7afcf09754..0cddff39a4 100644
--- a/src/drawscreen.c
+++ b/src/drawscreen.c
@@ -1662,7 +1662,7 @@ win_update(win_T *wp)
if (mod_top != 0
&& wp->w_topline == mod_top
&& (!wp->w_lines[0].wl_valid
- || wp->w_topline == wp->w_lines[0].wl_lnum))
+ || wp->w_topline <= wp->w_lines[0].wl_lnum))
{
// w_topline is the first changed line and window is not scrolled,
// the scrolling from changed lines will be done further down.