Patch 9.0.0517
Problem: When at the command line :redrawstatus does not work well.
Solution: Only update the statuslines instead of the screen. (closes #11180)
Files: src/ex_docmd.c, src/testdir/test_cmdline.vim,
src/testdir/dumps/Test_redrawstatus_in_autocmd_1.dump,
src/testdir/dumps/Test_redrawstatus_in_autocmd_2.dump,
src/testdir/dumps/Test_redrawstatus_in_autocmd_3.dump,
src/testdir/dumps/Test_redrawstatus_in_autocmd_4.dump,
src/testdir/dumps/Test_redrawstatus_in_autocmd_5.dump
*** ../vim-9.0.0516/src/ex_docmd.c 2022-09-20 13:17:35.420310763 +0100
--- src/ex_docmd.c 2022-09-20 17:02:21.058872927 +0100
***************
*** 8431,8442 ****
status_redraw_all();
else
status_redraw_curbuf();
! if (msg_scrolled)
return; // redraw later
RedrawingDisabled = 0;
p_lz = FALSE;
! update_screen(VIsual_active ? UPD_INVERTED : 0);
RedrawingDisabled = r;
p_lz = p;
out_flush();
--- 8431,8445 ----
status_redraw_all();
else
status_redraw_curbuf();
! if (msg_scrolled && (State & MODE_CMDLINE))
return; // redraw later
RedrawingDisabled = 0;
p_lz = FALSE;
! if (State & MODE_CMDLINE)
! redraw_statuslines();
! else
! update_screen(VIsual_active ? UPD_INVERTED : 0);
RedrawingDisabled = r;
p_lz = p;
out_flush();
*** ../vim-9.0.0516/src/testdir/test_cmdline.vim 2022-09-20
13:17:35.420310763 +0100
--- src/testdir/test_cmdline.vim 2022-09-20 17:02:21.062872921 +0100
***************
*** 216,222 ****
let lines =<< trim END
set laststatus=2
set statusline=%=:%{getcmdline()}
! autocmd CmdlineChanged * if getcmdline() == 'foobar' | redrawstatus |
endif
END
call writefile(lines, 'XTest_redrawstatus', 'D')
--- 216,222 ----
let lines =<< trim END
set laststatus=2
set statusline=%=:%{getcmdline()}
! autocmd CmdlineChanged * redrawstatus
END
call writefile(lines, 'XTest_redrawstatus', 'D')
***************
*** 226,233 ****
call term_sendkeys(buf, ":foobar")
call VerifyScreenDump(buf, 'Test_redrawstatus_in_autocmd_1', {})
" it is not postponed if messages have not scrolled
! call term_sendkeys(buf, "\<Esc>:foobar")
call VerifyScreenDump(buf, 'Test_redrawstatus_in_autocmd_2', {})
" clean up
call term_sendkeys(buf, "\<CR>")
--- 226,242 ----
call term_sendkeys(buf, ":foobar")
call VerifyScreenDump(buf, 'Test_redrawstatus_in_autocmd_1', {})
" it is not postponed if messages have not scrolled
! call term_sendkeys(buf, "\<Esc>:for in in range(3)")
call VerifyScreenDump(buf, 'Test_redrawstatus_in_autocmd_2', {})
+ " with cmdheight=1 messages have scrolled when typing :endfor
+ call term_sendkeys(buf, "\<CR>:endfor")
+ call VerifyScreenDump(buf, 'Test_redrawstatus_in_autocmd_3', {})
+ call term_sendkeys(buf, "\<CR>:set cmdheight=2\<CR>")
+ " with cmdheight=2 messages haven't scrolled when typing :for or :endfor
+ call term_sendkeys(buf, ":for in in range(3)")
+ call VerifyScreenDump(buf, 'Test_redrawstatus_in_autocmd_4', {})
+ call term_sendkeys(buf, "\<CR>:endfor")
+ call VerifyScreenDump(buf, 'Test_redrawstatus_in_autocmd_5', {})
" clean up
call term_sendkeys(buf, "\<CR>")
*** ../vim-9.0.0516/src/testdir/dumps/Test_redrawstatus_in_autocmd_1.dump
2022-09-20 13:17:35.420310763 +0100
--- src/testdir/dumps/Test_redrawstatus_in_autocmd_1.dump 2022-09-20
17:02:21.058872927 +0100
***************
*** 1,6 ****
|~+0#4040ff13#ffffff0| @73
|~| @73
! | +3#0000000&@73|:
|o+0&&|n|e| @71
|t|w|o| @71
|t|h|r|e@1| @69
--- 1,6 ----
|~+0#4040ff13#ffffff0| @73
|~| @73
! | +3#0000000&@45|:|e|c|h|o| |"|o|n|e|\|n|t|w|o|\|n|t|h|r|e@1|\|n|f|o|u|r|"
|o+0&&|n|e| @71
|t|w|o| @71
|t|h|r|e@1| @69
*** ../vim-9.0.0516/src/testdir/dumps/Test_redrawstatus_in_autocmd_2.dump
2022-09-20 13:17:35.420310763 +0100
--- src/testdir/dumps/Test_redrawstatus_in_autocmd_2.dump 2022-09-20
17:02:21.058872927 +0100
***************
*** 4,8 ****
|~| @73
|~| @73
|~| @73
! | +3#0000000&@67|:|f|o@1|b|a|r
! |:+0&&|f|o@1|b|a|r> @67
--- 4,8 ----
|~| @73
|~| @73
|~| @73
! | +3#0000000&@55|:|f|o|r| |i|n| |i|n| |r|a|n|g|e|(|3|)
! |:+0&&|f|o|r| |i|n| |i|n| |r|a|n|g|e|(|3|)> @55
*** ../vim-9.0.0516/src/testdir/dumps/Test_redrawstatus_in_autocmd_3.dump
2022-09-20 17:10:58.209852634 +0100
--- src/testdir/dumps/Test_redrawstatus_in_autocmd_3.dump 2022-09-20
17:02:21.058872927 +0100
***************
*** 0 ****
--- 1,8 ----
+ |~+0#4040ff13#ffffff0| @73
+ |~| @73
+ |~| @73
+ |~| @73
+ |~| @73
+ | +3#0000000&@55|:|f|o|r| |i|n| |i|n| |r|a|n|g|e|(|3|)
+ |:+0&&|f|o|r| |i|n| |i|n| |r|a|n|g|e|(|3|)| @55
+ |:| @1|:|e|n|d|f|o|r> @64
*** ../vim-9.0.0516/src/testdir/dumps/Test_redrawstatus_in_autocmd_4.dump
2022-09-20 17:10:58.213852628 +0100
--- src/testdir/dumps/Test_redrawstatus_in_autocmd_4.dump 2022-09-20
17:02:21.058872927 +0100
***************
*** 0 ****
--- 1,8 ----
+ | +0&#ffffff0@74
+ |~+0#4040ff13&| @73
+ |~| @73
+ |~| @73
+ |~| @73
+ | +3#0000000&@55|:|f|o|r| |i|n| |i|n| |r|a|n|g|e|(|3|)
+ |:+0&&|f|o|r| |i|n| |i|n| |r|a|n|g|e|(|3|)> @55
+ @75
*** ../vim-9.0.0516/src/testdir/dumps/Test_redrawstatus_in_autocmd_5.dump
2022-09-20 17:10:58.217852618 +0100
--- src/testdir/dumps/Test_redrawstatus_in_autocmd_5.dump 2022-09-20
17:02:21.058872927 +0100
***************
*** 0 ****
--- 1,8 ----
+ | +0&#ffffff0@74
+ |~+0#4040ff13&| @73
+ |~| @73
+ |~| @73
+ |~| @73
+ | +3#0000000&@66|:@1|e|n|d|f|o|r
+ |:+0&&|f|o|r| |i|n| |i|n| |r|a|n|g|e|(|3|)| @55
+ |:| @1|:|e|n|d|f|o|r> @64
*** ../vim-9.0.0516/src/version.c 2022-09-20 16:15:25.804584428 +0100
--- src/version.c 2022-09-20 17:10:42.481882563 +0100
***************
*** 701,702 ****
--- 701,704 ----
{ /* Add new patch number below this line */
+ /**/
+ 517,
/**/
--
hundred-and-one symptoms of being an internet addict:
112. You are amazed that anyone uses a phone without data...let
alone hear actual voices.
/// 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/20220920161305.5719D1C0852%40moolenaar.net.