diff options
author | Luuk van Baal <luukvbaal@gmail.com> | 2022-10-05 18:26:42 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-10-05 18:26:42 +0100 |
commit | 346823d3e5668b99d2c2fd920e7f215e21ad3ea7 (patch) | |
tree | ab5d401f50309df98b3975d1d71365e838a2208a /src/window.c | |
parent | 7beaf6a720ddc7e2989c8831872bfb98ec78a65d (diff) |
patch 9.0.0667: ml_get error when 'splitkeep' is "screen"v9.0.0667
Problem: ml_get error when 'splitkeep' is "screen". (Marius Gedminas)
Solution: Check the botline is not too large. (Luuk van Baal,
closes #11293, closes #11292)
Diffstat (limited to 'src/window.c')
-rw-r--r-- | src/window.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/window.c b/src/window.c index 79ff5a4269..1f3f9ad668 100644 --- a/src/window.c +++ b/src/window.c @@ -6356,7 +6356,8 @@ win_fix_scroll(int resize) if (wp->w_height != wp->w_prev_height) { // If window has moved update botline to keep the same screenlines. - if (*p_spk == 's' && wp->w_winrow != wp->w_prev_winrow) + if (*p_spk == 's' && wp->w_winrow != wp->w_prev_winrow + && wp->w_botline - 1 <= wp->w_buffer->b_ml.ml_line_count) { lnum = wp->w_cursor.lnum; diff = (wp->w_winrow - wp->w_prev_winrow) |