mirror of
https://github.com/neovim/neovim.git
synced 2025-09-24 20:18:32 +00:00
vim-patch:8.2.2495: text jumps up and down when moving the cursor
Problem: Text jumps up and down when moving the cursor in a small window
with wrapping text and 'scrolloff' set.
Solution: Adjust the computation of w_skipcol. (partly by Ghjuvan Lacambre,
closes vim/vim#7813)
8f33ebfade
This commit is contained in:
@@ -888,11 +888,11 @@ void curs_columns(
|
||||
} else {
|
||||
n = plines;
|
||||
}
|
||||
if ((colnr_T)n >= wp->w_height_inner + wp->w_skipcol / width) {
|
||||
if ((colnr_T)n >= wp->w_height_inner + wp->w_skipcol / width - so) {
|
||||
extra += 2;
|
||||
}
|
||||
|
||||
if (extra == 3 || plines < so * 2) {
|
||||
if (extra == 3 || plines <= so * 2) {
|
||||
// not enough room for 'scrolloff', put cursor in the middle
|
||||
n = wp->w_virtcol / width;
|
||||
if (n > wp->w_height_inner / 2) {
|
||||
|
Reference in New Issue
Block a user