patch 9.0.1061: cannot display 'showcmd' somewhere else
Problem: Cannot display 'showcmd' somewhere else.
Solution: Add the 'showcmdloc' option. (Luuk van Baal, closes #11684)
diff --git a/src/testdir/test_statusline.vim b/src/testdir/test_statusline.vim
index 15f2083..a829597 100644
--- a/src/testdir/test_statusline.vim
+++ b/src/testdir/test_statusline.vim
@@ -558,4 +558,26 @@
call StopVimInTerminal(buf)
endfunc
+func Test_statusline_showcmd()
+ CheckScreendump
+
+ let lines =<< trim END
+ set laststatus=2
+ set statusline=%S
+ set showcmdloc=statusline
+ call setline(1, ['a', 'b', 'c'])
+ END
+ call writefile(lines, 'XTest_statusline', 'D')
+
+ let buf = RunVimInTerminal('-S XTest_statusline', {'rows': 6})
+ call feedkeys("\<C-V>Gl", "xt")
+ call VerifyScreenDump(buf, 'Test_statusline_showcmd_1', {})
+
+ call feedkeys("\<Esc>1234", "xt")
+ call VerifyScreenDump(buf, 'Test_statusline_showcmd_2', {})
+
+ call feedkeys("\<Esc>:set statusline=\<CR>:\<CR>1234", "xt")
+ call VerifyScreenDump(buf, 'Test_statusline_showcmd_3', {})
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab