Mercurial > vim
comparison src/testdir/test_statusline.vim @ 31457:bb797331e21b v9.0.1061
patch 9.0.1061: cannot display 'showcmd' somewhere else
Commit: https://github.com/vim/vim/commit/ba936f6f4e85cc1408bc3967f9fd7665d948909b
Author: Luuk van Baal <luukvbaal@gmail.com>
Date: Thu Dec 15 13:15:39 2022 +0000
patch 9.0.1061: cannot display 'showcmd' somewhere else
Problem: Cannot display 'showcmd' somewhere else.
Solution: Add the 'showcmdloc' option. (Luuk van Baal, closes https://github.com/vim/vim/issues/11684)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 15 Dec 2022 14:30:05 +0100 |
parents | ae10b91ac6b3 |
children | 1102f4777518 |
comparison
equal
deleted
inserted
replaced
31456:38d3b3da981b | 31457:bb797331e21b |
---|---|
556 call VerifyScreenDump(buf, 'Test_statusline_hl', {}) | 556 call VerifyScreenDump(buf, 'Test_statusline_hl', {}) |
557 | 557 |
558 call StopVimInTerminal(buf) | 558 call StopVimInTerminal(buf) |
559 endfunc | 559 endfunc |
560 | 560 |
561 func Test_statusline_showcmd() | |
562 CheckScreendump | |
563 | |
564 let lines =<< trim END | |
565 set laststatus=2 | |
566 set statusline=%S | |
567 set showcmdloc=statusline | |
568 call setline(1, ['a', 'b', 'c']) | |
569 END | |
570 call writefile(lines, 'XTest_statusline', 'D') | |
571 | |
572 let buf = RunVimInTerminal('-S XTest_statusline', {'rows': 6}) | |
573 call feedkeys("\<C-V>Gl", "xt") | |
574 call VerifyScreenDump(buf, 'Test_statusline_showcmd_1', {}) | |
575 | |
576 call feedkeys("\<Esc>1234", "xt") | |
577 call VerifyScreenDump(buf, 'Test_statusline_showcmd_2', {}) | |
578 | |
579 call feedkeys("\<Esc>:set statusline=\<CR>:\<CR>1234", "xt") | |
580 call VerifyScreenDump(buf, 'Test_statusline_showcmd_3', {}) | |
581 endfunc | |
582 | |
561 " vim: shiftwidth=2 sts=2 expandtab | 583 " vim: shiftwidth=2 sts=2 expandtab |