Mercurial > vim
comparison src/move.c @ 32465:83074077c0b1 v9.0.1564
patch 9.0.1564: display moves up and down with 'incsearch' and 'smoothscroll'
Commit: https://github.com/vim/vim/commit/0222c2d103ad9298bec4dc8864cd80b4e7559db1
Author: Luuk van Baal <luukvbaal@gmail.com>
Date: Thu May 18 13:26:57 2023 +0100
patch 9.0.1564: display moves up and down with 'incsearch' and 'smoothscroll'
Problem: Display moves up and down with 'incsearch' and 'smoothscroll'.
Solution: Do not check if w_skipcol changed. (Luuk van Baal, closes https://github.com/vim/vim/issues/12410,
closes #12409)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 18 May 2023 14:30:09 +0200 |
parents | 45c426cebfcd |
children | c89816c3e2d7 |
comparison
equal
deleted
inserted
replaced
32464:f2138180c6f0 | 32465:83074077c0b1 |
---|---|
310 // When dragging with the mouse, don't scroll that quickly | 310 // When dragging with the mouse, don't scroll that quickly |
311 if (mouse_dragging > 0) | 311 if (mouse_dragging > 0) |
312 *so_ptr = mouse_dragging - 1; | 312 *so_ptr = mouse_dragging - 1; |
313 | 313 |
314 linenr_T old_topline = curwin->w_topline; | 314 linenr_T old_topline = curwin->w_topline; |
315 colnr_T old_skipcol = curwin->w_skipcol; | |
316 #ifdef FEAT_DIFF | 315 #ifdef FEAT_DIFF |
317 int old_topfill = curwin->w_topfill; | 316 int old_topfill = curwin->w_topfill; |
318 #endif | 317 #endif |
319 | 318 |
320 /* | 319 /* |
515 ) | 514 ) |
516 { | 515 { |
517 dollar_vcol = -1; | 516 dollar_vcol = -1; |
518 redraw_later(UPD_VALID); | 517 redraw_later(UPD_VALID); |
519 | 518 |
520 // Only reset w_skipcol if it was not just set to make cursor visible. | 519 // When 'smoothscroll' is not set, should reset w_skipcol. |
521 if (curwin->w_skipcol == old_skipcol) | 520 if (!curwin->w_p_sms) |
522 reset_skipcol(); | 521 reset_skipcol(); |
523 | 522 |
524 // May need to set w_skipcol when cursor in w_topline. | 523 // May need to set w_skipcol when cursor in w_topline. |
525 if (curwin->w_cursor.lnum == curwin->w_topline) | 524 if (curwin->w_cursor.lnum == curwin->w_topline) |
526 validate_cursor(); | 525 validate_cursor(); |