mirror of
https://github.com/neovim/neovim.git
synced 2025-10-08 02:46:31 +00:00
vim-patch:9.0.1000: with 'smoothscroll' skipcol may be reset unnecessarily
Problem: With 'smoothscroll' skipcol may be reset unnecessarily.
Solution: Check the line does actually fit in the window.
b21b8e9ed0
Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
@@ -1465,7 +1465,10 @@ void adjust_skipcol(void)
|
||||
bool scrolled = false;
|
||||
|
||||
validate_cheight();
|
||||
if (curwin->w_cline_height == curwin->w_height) {
|
||||
if (curwin->w_cline_height == curwin->w_height
|
||||
// w_cline_height may be capped at w_height, check there aren't
|
||||
// actually more lines.
|
||||
&& plines_win(curwin, curwin->w_cursor.lnum, false) <= curwin->w_height) {
|
||||
// the line just fits in the window, don't scroll
|
||||
reset_skipcol(curwin);
|
||||
return;
|
||||
|
Reference in New Issue
Block a user