aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/normal.c
diff options
context:
space:
mode:
authorLuuk van Baal <luukvbaal@gmail.com>2023-04-26 03:48:02 +0200
committerLuuk van Baal <luukvbaal@gmail.com>2023-05-02 13:11:46 +0200
commite51e63c9bae88bb2d4da669c667e8dbee3ec3562 (patch)
tree39ca86c6a3d91ad6512028b09df3a9c844cea0be /src/nvim/normal.c
parent7cc3062e9c13ea13986654119278997d8971baec (diff)
downloadrneovim-e51e63c9bae88bb2d4da669c667e8dbee3ec3562.tar.gz
rneovim-e51e63c9bae88bb2d4da669c667e8dbee3ec3562.tar.bz2
rneovim-e51e63c9bae88bb2d4da669c667e8dbee3ec3562.zip
vim-patch:9.0.0643: smoothscroll test fails
Problem: Smoothscroll test fails. Solution: Check if skipcol changed. https://github.com/vim/vim/commit/b34c4b7863af8718ad726173585dd38a7c292f0f Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'src/nvim/normal.c')
-rw-r--r--src/nvim/normal.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/nvim/normal.c b/src/nvim/normal.c
index 88741e1527..a51bde967e 100644
--- a/src/nvim/normal.c
+++ b/src/nvim/normal.c
@@ -2633,6 +2633,7 @@ static void nv_scroll_line(cmdarg_T *cap)
void scroll_redraw(int up, long count)
{
linenr_T prev_topline = curwin->w_topline;
+ int prev_skipcol = curwin->w_skipcol;
int prev_topfill = curwin->w_topfill;
linenr_T prev_lnum = curwin->w_cursor.lnum;
@@ -2651,6 +2652,7 @@ void scroll_redraw(int up, long count)
// we get stuck at one position. Don't move the cursor up if the
// first line of the buffer is already on the screen
while (curwin->w_topline == prev_topline
+ && curwin->w_skipcol == prev_skipcol
&& curwin->w_topfill == prev_topfill) {
if (up) {
if (curwin->w_cursor.lnum > prev_lnum