1
0
forked from aniani/vim

patch 9.0.1279: display shows lines scrolled down erroneously

Problem:    Display shows lines scrolled down erroneously. (Yishai Lerner)
Solution:   Do not change "wl_lnum" at index zero. (closes #11938)
This commit is contained in:
Bram Moolenaar
2023-02-04 13:57:55 +00:00
parent 4ad8ae8465
commit 61fdbfa1e3
5 changed files with 49 additions and 1 deletions

View File

@@ -611,7 +611,9 @@ changed_common(
{
if (wp->w_lines[i].wl_lnum >= lnum)
{
if (wp->w_lines[i].wl_lnum < lnume)
// Do not change wl_lnum at index zero, it is used to
// compare with w_topline. Invalidate it instead.
if (wp->w_lines[i].wl_lnum < lnume || i == 0)
{
// line included in change
wp->w_lines[i].wl_valid = FALSE;