diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-07-13 22:21:44 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-07-13 22:21:44 +0200 |
commit | 5bea41dea34bcc73c4efb1b554ad0a2018966ecc (patch) | |
tree | 3a81fa950978bb202d325f307a32972a4e6dbc0b /src | |
parent | 1840a7b4e3577e617f724c9d07ccc78195cc010a (diff) |
patch 8.2.3159: cursor displayed in wrong position after deleting linev8.2.3159
Problem: Cursor displayed in wrong position after deleting line.
Solution: When deleting lines do not approximate botline. (fixes #8559)
Diffstat (limited to 'src')
-rw-r--r-- | src/change.c | 9 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 8 insertions, 3 deletions
diff --git a/src/change.c b/src/change.c index 248e6d8487..73ea64ff19 100644 --- a/src/change.c +++ b/src/change.c @@ -563,9 +563,12 @@ changed_common( changed_cline_bef_curs_win(wp); if (wp->w_botline >= lnum) { - // Assume that botline doesn't change (inserted lines make - // other lines scroll down below botline). - approximate_botline_win(wp); + if (xtra < 0) + invalidate_botline_win(wp); + else + // Assume that botline doesn't change (inserted lines make + // other lines scroll down below botline). + approximate_botline_win(wp); } // Check if any w_lines[] entries have become invalid. diff --git a/src/version.c b/src/version.c index 3de3048447..86a6380727 100644 --- a/src/version.c +++ b/src/version.c @@ -756,6 +756,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 3159, +/**/ 3158, /**/ 3157, |