Consider the following script: vim -u NONE -i NONE -N --cmd 'let g:actual_curbuf="foo"' --cmd 'set statusline=%{bufnr('\'\'')} laststatus=2' --cmd 'redrawstatus' --cmd 'echo g:actual_curbuf'
you will see E121: Undefined variable: g:actual_curbuf. But trying to use help to understand what happens yields nothing: help actual_curbuf and help g:actual_curbuf give “E149: Sorry, no help for [g:]actual_curbuf”. diff -r a8993ea8dec2 runtime/doc/options.txt --- a/runtime/doc/options.txt Пн авг 24 20:13:27 2015 +0200 +++ b/runtime/doc/options.txt Ср ноя 11 15:22:26 2015 +0300 @@ -7003,7 +7003,7 @@ A jump table for the options with a shor become empty. This will make a group like the following disappear completely from the statusline when none of the flags are set. > :set statusline=...%(\ [%M%R%H]%)... -< +< *g:actual_curbuf* Beware that an expression is evaluated each and every time the status line is displayed. The current buffer and current window will be set temporarily to that of the window (and buffer) whose statusline is -- -- 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 vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
*** /tmp/extdiff.gjo5Xw/vim-upstream.a8993ea8dec2/runtime/doc/options.txt 2015-11-11 15:24:05.625056396 +0300 --- /home/zyx/a.a/Proj/c/vim-upstream/runtime/doc/options.txt 2015-11-11 15:17:56.045007319 +0300 *************** *** 7003,7009 **** become empty. This will make a group like the following disappear completely from the statusline when none of the flags are set. > :set statusline=...%(\ [%M%R%H]%)... ! < Beware that an expression is evaluated each and every time the status line is displayed. The current buffer and current window will be set temporarily to that of the window (and buffer) whose statusline is --- 7003,7009 ---- become empty. This will make a group like the following disappear completely from the statusline when none of the flags are set. > :set statusline=...%(\ [%M%R%H]%)... ! < *g:actual_curbuf* Beware that an expression is evaluated each and every time the status line is displayed. The current buffer and current window will be set temporarily to that of the window (and buffer) whose statusline is