Mercurial > vim
comparison src/normal.c @ 30616:eb86a6330ae3 v9.0.0643
patch 9.0.0643: smoothscroll test fails
Commit: https://github.com/vim/vim/commit/b34c4b7863af8718ad726173585dd38a7c292f0f
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Oct 2 22:32:08 2022 +0100
patch 9.0.0643: smoothscroll test fails
Problem: Smoothscroll test fails.
Solution: Check if skipcol changed.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 02 Oct 2022 23:45:03 +0200 |
parents | 584231b9b37e |
children | 101f08b49ed3 |
comparison
equal
deleted
inserted
replaced
30615:fb8566e27f58 | 30616:eb86a6330ae3 |
---|---|
2468 */ | 2468 */ |
2469 void | 2469 void |
2470 scroll_redraw(int up, long count) | 2470 scroll_redraw(int up, long count) |
2471 { | 2471 { |
2472 linenr_T prev_topline = curwin->w_topline; | 2472 linenr_T prev_topline = curwin->w_topline; |
2473 int prev_skipcol = curwin->w_skipcol; | |
2473 #ifdef FEAT_DIFF | 2474 #ifdef FEAT_DIFF |
2474 int prev_topfill = curwin->w_topfill; | 2475 int prev_topfill = curwin->w_topfill; |
2475 #endif | 2476 #endif |
2476 linenr_T prev_lnum = curwin->w_cursor.lnum; | 2477 linenr_T prev_lnum = curwin->w_cursor.lnum; |
2477 | 2478 |
2489 | 2490 |
2490 // If moved back to where we were, at least move the cursor, otherwise | 2491 // If moved back to where we were, at least move the cursor, otherwise |
2491 // we get stuck at one position. Don't move the cursor up if the | 2492 // we get stuck at one position. Don't move the cursor up if the |
2492 // first line of the buffer is already on the screen | 2493 // first line of the buffer is already on the screen |
2493 while (curwin->w_topline == prev_topline | 2494 while (curwin->w_topline == prev_topline |
2495 && curwin->w_skipcol == prev_skipcol | |
2494 #ifdef FEAT_DIFF | 2496 #ifdef FEAT_DIFF |
2495 && curwin->w_topfill == prev_topfill | 2497 && curwin->w_topfill == prev_topfill |
2496 #endif | 2498 #endif |
2497 ) | 2499 ) |
2498 { | 2500 { |