forked from aniani/vim
patch 8.2.2686: status line is not updated when going to cmdline mode
Problem: Status line is not updated when going to cmdline mode. Solution: Redraw status lines if 'statusline' is set and going to status line mode. (based on patch from Justin M. Keyes et al., closes #8044)
This commit is contained in:
@@ -1706,6 +1706,15 @@ getcmdline_int(
|
|||||||
// and execute commands. Display may be messed up a bit.
|
// and execute commands. Display may be messed up a bit.
|
||||||
if (did_emsg)
|
if (did_emsg)
|
||||||
redrawcmd();
|
redrawcmd();
|
||||||
|
|
||||||
|
// Redraw the statusline in case it uses the current mode using the mode()
|
||||||
|
// function.
|
||||||
|
if (!cmd_silent && msg_scrolled == 0 && *p_stl != NUL)
|
||||||
|
{
|
||||||
|
curwin->w_redr_status = TRUE;
|
||||||
|
redraw_statuslines();
|
||||||
|
}
|
||||||
|
|
||||||
did_emsg = FALSE;
|
did_emsg = FALSE;
|
||||||
got_int = FALSE;
|
got_int = FALSE;
|
||||||
|
|
||||||
|
5
src/testdir/dumps/Test_statusline_mode_1.dump
Normal file
5
src/testdir/dumps/Test_statusline_mode_1.dump
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
> +0&#ffffff0@49
|
||||||
|
|~+0#4040ff13&| @48
|
||||||
|
|~| @48
|
||||||
|
|-+3#0000000&|n|-| @46
|
||||||
|
| +0&&@49
|
5
src/testdir/dumps/Test_statusline_mode_2.dump
Normal file
5
src/testdir/dumps/Test_statusline_mode_2.dump
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
| +0&#ffffff0@49
|
||||||
|
|~+0#4040ff13&| @48
|
||||||
|
|~| @48
|
||||||
|
|-+3#0000000&|c|-| @46
|
||||||
|
|:+0&&> @48
|
@@ -448,6 +448,27 @@ func Test_statusline_removed_group()
|
|||||||
call delete('XTest_statusline')
|
call delete('XTest_statusline')
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
func Test_statusline_using_mode()
|
||||||
|
CheckScreendump
|
||||||
|
|
||||||
|
let lines =<< trim END
|
||||||
|
set laststatus=2
|
||||||
|
let &statusline = '-%{mode()}-'
|
||||||
|
END
|
||||||
|
call writefile(lines, 'XTest_statusline')
|
||||||
|
|
||||||
|
let buf = RunVimInTerminal('-S XTest_statusline', {'rows': 5, 'cols': 50})
|
||||||
|
call VerifyScreenDump(buf, 'Test_statusline_mode_1', {})
|
||||||
|
|
||||||
|
call term_sendkeys(buf, ":")
|
||||||
|
call VerifyScreenDump(buf, 'Test_statusline_mode_2', {})
|
||||||
|
|
||||||
|
" clean up
|
||||||
|
call term_sendkeys(buf, "\<CR>")
|
||||||
|
call StopVimInTerminal(buf)
|
||||||
|
call delete('XTest_statusline')
|
||||||
|
endfunc
|
||||||
|
|
||||||
func Test_statusline_after_split_vsplit()
|
func Test_statusline_after_split_vsplit()
|
||||||
only
|
only
|
||||||
|
|
||||||
|
@@ -750,6 +750,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
2686,
|
||||||
/**/
|
/**/
|
||||||
2685,
|
2685,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user