int r = RedrawingDisabled;
int p = p_lz;
- RedrawingDisabled = 0;
- p_lz = FALSE;
if (eap->forceit)
status_redraw_all();
else
status_redraw_curbuf();
+ if (State & MODE_CMDLINE)
+ return; // redraw later
+
+ RedrawingDisabled = 0;
+ p_lz = FALSE;
update_screen(VIsual_active ? UPD_INVERTED : 0);
RedrawingDisabled = r;
p_lz = p;
call StopVimInTerminal(buf)
endfunc
+func Test_redrawstatus_in_autocmd()
+ CheckScreendump
+
+ let lines =<< trim END
+ set cmdheight=2
+ autocmd CmdlineChanged * if getcmdline() == 'foobar' | redrawstatus | endif
+ END
+ call writefile(lines, 'XTest_redrawstatus', 'D')
+
+ let buf = RunVimInTerminal('-S XTest_redrawstatus', {'rows': 8})
+ call term_sendkeys(buf, ":echo \"one\\ntwo\\nthree\\nfour\"\<CR>")
+ call term_sendkeys(buf, ":foobar")
+ call VerifyScreenDump(buf, 'Test_redrawstatus_in_autocmd_1', {})
+
+ " clean up
+ call term_sendkeys(buf, "\<CR>")
+ call StopVimInTerminal(buf)
+endfunc
+
func Test_changing_cmdheight()
CheckScreendump