Mercurial > vim
comparison src/move.c @ 28782:3892e7574812 v8.2.4915
patch 8.2.4915: sometimes the cursor is in the wrong position
Commit: https://github.com/vim/vim/commit/a91cb98bb36b0f9dc3c378c0bbd9a69de29830fa
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun May 8 19:39:31 2022 +0100
patch 8.2.4915: sometimes the cursor is in the wrong position
Problem: Sometimes the cursor is in the wrong position.
Solution: When the cursor moved to another line, recompute w_botline.
(closes #9736)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 08 May 2022 20:45:03 +0200 |
parents | 51b5cab35afa |
children | d0241e74bfdb |
comparison
equal
deleted
inserted
replaced
28781:9086dad8bff2 | 28782:3892e7574812 |
---|---|
487 check_cursor_moved(win_T *wp) | 487 check_cursor_moved(win_T *wp) |
488 { | 488 { |
489 if (wp->w_cursor.lnum != wp->w_valid_cursor.lnum) | 489 if (wp->w_cursor.lnum != wp->w_valid_cursor.lnum) |
490 { | 490 { |
491 wp->w_valid &= ~(VALID_WROW|VALID_WCOL|VALID_VIRTCOL | 491 wp->w_valid &= ~(VALID_WROW|VALID_WCOL|VALID_VIRTCOL |
492 |VALID_CHEIGHT|VALID_CROW|VALID_TOPLINE); | 492 |VALID_CHEIGHT|VALID_CROW|VALID_TOPLINE |
493 |VALID_BOTLINE|VALID_BOTLINE_AP); | |
493 wp->w_valid_cursor = wp->w_cursor; | 494 wp->w_valid_cursor = wp->w_cursor; |
494 wp->w_valid_leftcol = wp->w_leftcol; | 495 wp->w_valid_leftcol = wp->w_leftcol; |
495 } | 496 } |
496 else if (wp->w_cursor.col != wp->w_valid_cursor.col | 497 else if (wp->w_cursor.col != wp->w_valid_cursor.col |
497 || wp->w_leftcol != wp->w_valid_leftcol | 498 || wp->w_leftcol != wp->w_valid_leftcol |