Patch 8.2.4626
Problem: Visual area not fully updated when removing sign in Visual mode
while scrolling.
Solution: Adjust check for topline. (closes #10017)
Files: src/drawscreen.c, src/testdir/test_display.vim,
src/testdir/dumps/Test_display_scroll_update_visual.dump
*** ../vim-8.2.4625/src/drawscreen.c 2022-03-23 14:55:19.709745872 +0000
--- src/drawscreen.c 2022-03-25 15:40:09.915781624 +0000
***************
*** 1730,1736 ****
if (mod_top != 0
&& wp->w_topline == mod_top
&& (!wp->w_lines[0].wl_valid
! || wp->w_topline <= wp->w_lines[0].wl_lnum))
{
// w_topline is the first changed line and window is not scrolled,
// the scrolling from changed lines will be done further down.
--- 1730,1736 ----
if (mod_top != 0
&& wp->w_topline == mod_top
&& (!wp->w_lines[0].wl_valid
! || wp->w_topline == wp->w_lines[0].wl_lnum))
{
// w_topline is the first changed line and window is not scrolled,
// the scrolling from changed lines will be done further down.
*** ../vim-8.2.4625/src/testdir/test_display.vim 2022-02-10
19:51:42.545569904 +0000
--- src/testdir/test_display.vim 2022-03-25 15:38:52.255872873 +0000
***************
*** 256,261 ****
--- 256,282 ----
call StopVimInTerminal(buf)
endfunc
+ func Test_display_scroll_update_visual()
+ CheckScreendump
+
+ let lines =<< trim END
+ set scrolloff=0
+ call setline(1, repeat(['foo'], 10))
+ call sign_define('foo', { 'text': '>' })
+ call sign_place(1, 'bar', 'foo', bufnr(), { 'lnum': 2 })
+ call sign_place(2, 'bar', 'foo', bufnr(), { 'lnum': 1 })
+ autocmd CursorMoved * if getcurpos()[1] == 2 | call sign_unplace('bar',
{ 'id': 1 }) | endif
+ END
+ call writefile(lines, 'XupdateVisual.vim')
+
+ let buf = RunVimInTerminal('-S XupdateVisual.vim', #{rows: 8, cols: 60})
+ call term_sendkeys(buf, "VG7kk")
+ call VerifyScreenDump(buf, 'Test_display_scroll_update_visual', {})
+
+ call StopVimInTerminal(buf)
+ call delete('XupdateVisual.vim')
+ endfunc
+
" Test for 'eob' (EndOfBuffer) item in 'fillchars'
func Test_eob_fillchars()
" default value
*** ../vim-8.2.4625/src/testdir/dumps/Test_display_scroll_update_visual.dump
2022-03-25 15:41:16.523701361 +0000
--- src/testdir/dumps/Test_display_scroll_update_visual.dump 2022-03-25
15:39:04.127859127 +0000
***************
*** 0 ****
--- 1,8 ----
+ | +0#0000e05#a8a8a8255@1>f+0#0000000#ffffff0|o+0&#e0e0e08@1| | +0&#ffffff0@53
+ | +0#0000e05#a8a8a8255@1|f+0#0000000#ffffff0|o@1| @54
+ | +0#0000e05#a8a8a8255@1|f+0#0000000#ffffff0|o@1| @54
+ | +0#0000e05#a8a8a8255@1|f+0#0000000#ffffff0|o@1| @54
+ | +0#0000e05#a8a8a8255@1|f+0#0000000#ffffff0|o@1| @54
+ | +0#0000e05#a8a8a8255@1|f+0#0000000#ffffff0|o@1| @54
+ | +0#0000e05#a8a8a8255@1|f+0#0000000#ffffff0|o@1| @54
+ |-+2&&@1| |V|I|S|U|A|L| |L|I|N|E| |-@1| +0&&@14|2| @8|2|,|1| @10|3@1|%|
*** ../vim-8.2.4625/src/version.c 2022-03-25 14:54:12.240479311 +0000
--- src/version.c 2022-03-25 15:41:02.515718374 +0000
***************
*** 752,753 ****
--- 752,755 ----
{ /* Add new patch number below this line */
+ /**/
+ 4626,
/**/
--
WOMAN: King of the who?
ARTHUR: The Britons.
WOMAN: Who are the Britons?
ARTHUR: Well, we all are. we're all Britons and I am your king.
The Quest for the Holy Grail (Monty Python)
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/20220325154324.A66CB1C0C1F%40moolenaar.net.