Mercurial > vim
comparison src/testdir/test_statusline.vim @ 31726:122cfa668b95 v9.0.1195
patch 9.0.1195: restoring KeyTyped when building statusline not tested
Commit: https://github.com/vim/vim/commit/378e6c03f98efc88e8c2675e05a548f9bb7889a1
Author: zeertzjq <zeertzjq@outlook.com>
Date: Sat Jan 14 11:46:49 2023 +0000
patch 9.0.1195: restoring KeyTyped when building statusline not tested
Problem: Restoring KeyTyped when building statusline not tested.
Solution: Add a test. Clean up and fix other tests. (closes https://github.com/vim/vim/issues/11815)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 14 Jan 2023 13:00:05 +0100 |
parents | 1102f4777518 |
children | dbec60b8c253 |
comparison
equal
deleted
inserted
replaced
31725:fe59eda87b30 | 31726:122cfa668b95 |
---|---|
567 | 567 |
568 func Test_statusline_showcmd() | 568 func Test_statusline_showcmd() |
569 CheckScreendump | 569 CheckScreendump |
570 | 570 |
571 let lines =<< trim END | 571 let lines =<< trim END |
572 func MyStatusLine() | |
573 return '%S' | |
574 endfunc | |
575 | |
572 set laststatus=2 | 576 set laststatus=2 |
573 set statusline=%S | 577 set statusline=%!MyStatusLine() |
574 set showcmdloc=statusline | 578 set showcmdloc=statusline |
575 call setline(1, ['a', 'b', 'c']) | 579 call setline(1, ['a', 'b', 'c']) |
580 set foldopen+=jump | |
581 1,2fold | |
582 3 | |
576 END | 583 END |
577 call writefile(lines, 'XTest_statusline', 'D') | 584 call writefile(lines, 'XTest_statusline', 'D') |
578 | 585 |
579 let buf = RunVimInTerminal('-S XTest_statusline', {'rows': 6}) | 586 let buf = RunVimInTerminal('-S XTest_statusline', {'rows': 6}) |
580 call feedkeys("\<C-V>Gl", "xt") | 587 |
588 call term_sendkeys(buf, "g") | |
581 call VerifyScreenDump(buf, 'Test_statusline_showcmd_1', {}) | 589 call VerifyScreenDump(buf, 'Test_statusline_showcmd_1', {}) |
582 | 590 |
583 call feedkeys("\<Esc>1234", "xt") | 591 " typing "gg" should open the fold |
592 call term_sendkeys(buf, "g") | |
584 call VerifyScreenDump(buf, 'Test_statusline_showcmd_2', {}) | 593 call VerifyScreenDump(buf, 'Test_statusline_showcmd_2', {}) |
585 | 594 |
586 call feedkeys("\<Esc>:set statusline=\<CR>:\<CR>1234", "xt") | 595 call term_sendkeys(buf, "\<C-V>Gl") |
587 call VerifyScreenDump(buf, 'Test_statusline_showcmd_3', {}) | 596 call VerifyScreenDump(buf, 'Test_statusline_showcmd_3', {}) |
597 | |
598 call term_sendkeys(buf, "\<Esc>1234") | |
599 call VerifyScreenDump(buf, 'Test_statusline_showcmd_4', {}) | |
600 | |
601 call term_sendkeys(buf, "\<Esc>:set statusline=\<CR>") | |
602 call term_sendkeys(buf, ":\<CR>") | |
603 call term_sendkeys(buf, "1234") | |
604 call VerifyScreenDump(buf, 'Test_statusline_showcmd_5', {}) | |
605 | |
606 call StopVimInTerminal(buf) | |
588 endfunc | 607 endfunc |
589 | 608 |
590 " vim: shiftwidth=2 sts=2 expandtab | 609 " vim: shiftwidth=2 sts=2 expandtab |