diff options
author | Luuk van Baal <luukvbaal@gmail.com> | 2022-10-17 14:22:03 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-10-17 14:22:03 +0100 |
commit | a1a46da87d91cfbf46866627b3e66a757145e8c3 (patch) | |
tree | 060fdc50d91bf1a973a522a1e50c106b6481ad17 | |
parent | 4ac8e7948cb3e07bc4598ede8b274891d14dfa7c (diff) | |
download | vim-git-a1a46da87d91cfbf46866627b3e66a757145e8c3.tar.gz |
patch 9.0.0780: 'scroll' value computed in unexpected locationv9.0.0780
Problem: 'scroll' value computed in unexpected location.
Solution: Compute 'scroll' when the window height is changed. (Luuk van
Baal, closes #11387)
-rw-r--r-- | src/version.c | 2 | ||||
-rw-r--r-- | src/window.c | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/version.c b/src/version.c index b872e3f6f..947f6531e 100644 --- a/src/version.c +++ b/src/version.c @@ -696,6 +696,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 780, +/**/ 779, /**/ 778, diff --git a/src/window.c b/src/window.c index 51416af53..8d61defab 100644 --- a/src/window.c +++ b/src/window.c @@ -6378,7 +6378,6 @@ win_fix_scroll(int resize) invalidate_botline_win(wp); validate_botline_win(wp); } - win_comp_scroll(wp); wp->w_prev_height = wp->w_height; wp->w_prev_winrow = wp->w_winrow; } @@ -6472,6 +6471,7 @@ win_new_height(win_T *wp, int height) wp->w_height = height; wp->w_skipcol = 0; + win_comp_scroll(wp); // There is no point in adjusting the scroll position when exiting. Some // values might be invalid. @@ -6596,7 +6596,6 @@ scroll_to_fraction(win_T *wp, int prev_height) if (prev_height > 0) wp->w_prev_fraction_row = wp->w_wrow; - win_comp_scroll(wp); redraw_win_later(wp, UPD_SOME_VALID); wp->w_redr_status = TRUE; invalidate_botline_win(wp); |