diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-02-10 20:56:54 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-10 20:56:54 -0500 |
commit | 1aec5ba85e97889c792253424c5de9c12ddd6cf4 (patch) | |
tree | 62c78074f611cb812eb630f6e1c88eeabeae06bd /src/nvim/move.c | |
parent | 61aea004d7101e138794a337c03ef00a6b3994e6 (diff) | |
parent | 81b4c881302640747de39f805312966c541acc47 (diff) | |
download | rneovim-1aec5ba85e97889c792253424c5de9c12ddd6cf4.tar.gz rneovim-1aec5ba85e97889c792253424c5de9c12ddd6cf4.tar.bz2 rneovim-1aec5ba85e97889c792253424c5de9c12ddd6cf4.zip |
Merge pull request #13908 from janlazo/vim-8.2.2489
vim-patch:8.1.0341,8.2.{2489,2490,2492,2495,2496}
Diffstat (limited to 'src/nvim/move.c')
-rw-r--r-- | src/nvim/move.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/move.c b/src/nvim/move.c index a6afdc27d9..1210a3365a 100644 --- a/src/nvim/move.c +++ b/src/nvim/move.c @@ -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) { |