patch 8.2.1488: text does not scroll when inserting above first line
Problem: Text does not scroll when inserting above first line.
Solution: Adjust off-by-one error. (Ken Takata, closes #6739)
diff --git a/src/drawscreen.c b/src/drawscreen.c
index 7afcf09..0cddff3 100644
--- a/src/drawscreen.c
+++ b/src/drawscreen.c
@@ -1662,7 +1662,7 @@
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.