mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
patch 8.2.2737: status line not updated when local 'statusline' option set
Problem: Status line not updated when local 'statusline' option set. Solution: Check the 'statusline' option of each window.
This commit is contained in:
@@ -1710,9 +1710,18 @@ getcmdline_int(
|
|||||||
#ifdef FEAT_STL_OPT
|
#ifdef FEAT_STL_OPT
|
||||||
// Redraw the statusline in case it uses the current mode using the mode()
|
// Redraw the statusline in case it uses the current mode using the mode()
|
||||||
// function.
|
// function.
|
||||||
if (!cmd_silent && msg_scrolled == 0 && *p_stl != NUL)
|
if (!cmd_silent && msg_scrolled == 0)
|
||||||
{
|
{
|
||||||
curwin->w_redr_status = TRUE;
|
int found_one = FALSE;
|
||||||
|
win_T *wp;
|
||||||
|
|
||||||
|
FOR_ALL_WINDOWS(wp)
|
||||||
|
if (*p_stl != NUL || *wp->w_p_stl != NUL)
|
||||||
|
{
|
||||||
|
wp->w_redr_status = TRUE;
|
||||||
|
found_one = TRUE;
|
||||||
|
}
|
||||||
|
if (found_one)
|
||||||
redraw_statuslines();
|
redraw_statuslines();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@@ -1,5 +1,7 @@
|
|||||||
> +0&#ffffff0@49
|
> +0&#ffffff0@49
|
||||||
|~+0#4040ff13&| @48
|
|~+0#4040ff13&| @48
|
||||||
|~| @48
|
|++3#0000000&|n|+| @46
|
||||||
|-+3#0000000&|n|-| @46
|
| +0&&@49
|
||||||
|
|~+0#4040ff13&| @48
|
||||||
|
|-+1#0000000&|n|-| @46
|
||||||
| +0&&@49
|
| +0&&@49
|
||||||
|
@@ -1,5 +1,7 @@
|
|||||||
| +0&#ffffff0@49
|
| +0&#ffffff0@49
|
||||||
|~+0#4040ff13&| @48
|
|~+0#4040ff13&| @48
|
||||||
|~| @48
|
|++3#0000000&|c|+| @46
|
||||||
|-+3#0000000&|c|-| @46
|
| +0&&@49
|
||||||
|
|~+0#4040ff13&| @48
|
||||||
|
|-+1#0000000&|c|-| @46
|
||||||
|:+0&&> @48
|
|:+0&&> @48
|
||||||
|
@@ -452,19 +452,20 @@ func Test_statusline_using_mode()
|
|||||||
CheckScreendump
|
CheckScreendump
|
||||||
|
|
||||||
let lines =<< trim END
|
let lines =<< trim END
|
||||||
set laststatus=2
|
setlocal statusline=-%{mode()}-
|
||||||
let &statusline = '-%{mode()}-'
|
split
|
||||||
|
setlocal statusline=+%{mode()}+
|
||||||
END
|
END
|
||||||
call writefile(lines, 'XTest_statusline')
|
call writefile(lines, 'XTest_statusline')
|
||||||
|
|
||||||
let buf = RunVimInTerminal('-S XTest_statusline', {'rows': 5, 'cols': 50})
|
let buf = RunVimInTerminal('-S XTest_statusline', {'rows': 7, 'cols': 50})
|
||||||
call VerifyScreenDump(buf, 'Test_statusline_mode_1', {})
|
call VerifyScreenDump(buf, 'Test_statusline_mode_1', {})
|
||||||
|
|
||||||
call term_sendkeys(buf, ":")
|
call term_sendkeys(buf, ":")
|
||||||
call VerifyScreenDump(buf, 'Test_statusline_mode_2', {})
|
call VerifyScreenDump(buf, 'Test_statusline_mode_2', {})
|
||||||
|
|
||||||
" clean up
|
" clean up
|
||||||
call term_sendkeys(buf, "\<CR>")
|
call term_sendkeys(buf, "close\<CR>")
|
||||||
call StopVimInTerminal(buf)
|
call StopVimInTerminal(buf)
|
||||||
call delete('XTest_statusline')
|
call delete('XTest_statusline')
|
||||||
endfunc
|
endfunc
|
||||||
|
@@ -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 */
|
||||||
|
/**/
|
||||||
|
2737,
|
||||||
/**/
|
/**/
|
||||||
2736,
|
2736,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user