Patch 8.2.2737
Problem: Status line not updated when local 'statusline' option set.
Solution: Check the 'statusline' option of each window.
Files: src/ex_getln.c, src/testdir/test_statusline.vim,
src/testdir/dumps/Test_statusline_mode_1.dump,
src/testdir/dumps/Test_statusline_mode_2.dump
*** ../vim-8.2.2736/src/ex_getln.c 2021-04-01 21:57:42.486486962 +0200
--- src/ex_getln.c 2021-04-08 18:26:12.405732731 +0200
***************
*** 1710,1719 ****
#ifdef FEAT_STL_OPT
// 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();
}
#endif
--- 1710,1728 ----
#ifdef FEAT_STL_OPT
// Redraw the statusline in case it uses the current mode using the mode()
// function.
! if (!cmd_silent && msg_scrolled == 0)
{
! 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();
}
#endif
*** ../vim-8.2.2736/src/testdir/test_statusline.vim 2021-04-01
18:46:49.850092775 +0200
--- src/testdir/test_statusline.vim 2021-04-08 18:18:33.358956578 +0200
***************
*** 452,470 ****
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
--- 452,471 ----
CheckScreendump
let lines =<< trim END
! setlocal statusline=-%{mode()}-
! split
! setlocal statusline=+%{mode()}+
END
call writefile(lines, 'XTest_statusline')
! let buf = RunVimInTerminal('-S XTest_statusline', {'rows': 7, '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, "close\<CR>")
call StopVimInTerminal(buf)
call delete('XTest_statusline')
endfunc
*** ../vim-8.2.2736/src/testdir/dumps/Test_statusline_mode_1.dump
2021-04-01 18:46:49.854092770 +0200
--- src/testdir/dumps/Test_statusline_mode_1.dump 2021-04-08
18:22:50.450273033 +0200
***************
*** 1,5 ****
> +0&#ffffff0@49
|~+0#4040ff13&| @48
! |~| @48
! |-+3#0000000&|n|-| @46
| +0&&@49
--- 1,7 ----
> +0&#ffffff0@49
|~+0#4040ff13&| @48
! |++3#0000000&|n|+| @46
! | +0&&@49
! |~+0#4040ff13&| @48
! |-+1#0000000&|n|-| @46
| +0&&@49
*** ../vim-8.2.2736/src/testdir/dumps/Test_statusline_mode_2.dump
2021-04-01 18:46:49.854092770 +0200
--- src/testdir/dumps/Test_statusline_mode_2.dump 2021-04-08
18:22:51.498270236 +0200
***************
*** 1,5 ****
| +0&#ffffff0@49
|~+0#4040ff13&| @48
! |~| @48
! |-+3#0000000&|c|-| @46
|:+0&&> @48
--- 1,7 ----
| +0&#ffffff0@49
|~+0#4040ff13&| @48
! |++3#0000000&|c|+| @46
! | +0&&@49
! |~+0#4040ff13&| @48
! |-+1#0000000&|c|-| @46
|:+0&&> @48
*** ../vim-8.2.2736/src/version.c 2021-04-08 18:04:58.865044553 +0200
--- src/version.c 2021-04-08 18:19:49.082755860 +0200
***************
*** 752,753 ****
--- 752,755 ----
{ /* Add new patch number below this line */
+ /**/
+ 2737,
/**/
--
>From "know your smileys":
y:-) Bad toupee
/// 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/202104081628.138GSL3W3898161%40masaka.moolenaar.net.