diff options
author | Bram Moolenaar <Bram@vim.org> | 2023-02-04 13:57:55 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2023-02-04 13:57:55 +0000 |
commit | 61fdbfa1e3c842252b701aec12f45839ca41ece5 (patch) | |
tree | 27b0caec5466437a677882afbbe37e40b559a7ad /src/change.c | |
parent | 4ad8ae8465e30df38dba31910f130891b16d38a0 (diff) |
patch 9.0.1279: display shows lines scrolled down erroneouslyv9.0.1279
Problem: Display shows lines scrolled down erroneously. (Yishai Lerner)
Solution: Do not change "wl_lnum" at index zero. (closes #11938)
Diffstat (limited to 'src/change.c')
-rw-r--r-- | src/change.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/change.c b/src/change.c index 1e7bdd6bdb..e5798c54a4 100644 --- a/src/change.c +++ b/src/change.c @@ -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; |