comparison src/change.c @ 25246:5932642234e1 v8.2.3159

patch 8.2.3159: cursor displayed in wrong position after deleting line Commit: https://github.com/vim/vim/commit/5bea41dea34bcc73c4efb1b554ad0a2018966ecc Author: Bram Moolenaar <Bram@vim.org> Date: Tue Jul 13 22:21:44 2021 +0200 patch 8.2.3159: cursor displayed in wrong position after deleting line Problem: Cursor displayed in wrong position after deleting line. Solution: When deleting lines do not approximate botline. (fixes https://github.com/vim/vim/issues/8559)
author Bram Moolenaar <Bram@vim.org>
date Tue, 13 Jul 2021 22:30:05 +0200
parents 09e64e81c473
children 1cde96e768e4
comparison
equal deleted inserted replaced
25245:202f48dbc48a 25246:5932642234e1
561 changed_line_abv_curs_win(wp); 561 changed_line_abv_curs_win(wp);
562 else if (wp->w_cursor.lnum == lnum && wp->w_cursor.col >= col) 562 else if (wp->w_cursor.lnum == lnum && wp->w_cursor.col >= col)
563 changed_cline_bef_curs_win(wp); 563 changed_cline_bef_curs_win(wp);
564 if (wp->w_botline >= lnum) 564 if (wp->w_botline >= lnum)
565 { 565 {
566 // Assume that botline doesn't change (inserted lines make 566 if (xtra < 0)
567 // other lines scroll down below botline). 567 invalidate_botline_win(wp);
568 approximate_botline_win(wp); 568 else
569 // Assume that botline doesn't change (inserted lines make
570 // other lines scroll down below botline).
571 approximate_botline_win(wp);
569 } 572 }
570 573
571 // Check if any w_lines[] entries have become invalid. 574 // Check if any w_lines[] entries have become invalid.
572 // For entries below the change: Correct the lnums for 575 // For entries below the change: Correct the lnums for
573 // inserted/deleted lines. Makes it possible to stop displaying 576 // inserted/deleted lines. Makes it possible to stop displaying