diff options
author | bfredl <bjorn.linse@gmail.com> | 2024-03-14 20:00:07 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-14 20:00:07 +0100 |
commit | 4de4f13eb35e40799198689a5ae0bc534b4e38a8 (patch) | |
tree | 6327adb3dea606ba872755c9e9ede338729c1034 /test/functional/ui/messages_spec.lua | |
parent | a6b6d036b19a548e3f2a199c6927ac7495c02ea1 (diff) | |
parent | 0570a19c8a84debcdf2bc73f4c5f2d7d9de3ead2 (diff) | |
download | rneovim-4de4f13eb35e40799198689a5ae0bc534b4e38a8.tar.gz rneovim-4de4f13eb35e40799198689a5ae0bc534b4e38a8.tar.bz2 rneovim-4de4f13eb35e40799198689a5ae0bc534b4e38a8.zip |
Merge pull request #27852 from bfredl/persistent_intro
fix(intro): make intro explicitly stateful
Diffstat (limited to 'test/functional/ui/messages_spec.lua')
-rw-r--r-- | test/functional/ui/messages_spec.lua | 44 |
1 files changed, 40 insertions, 4 deletions
diff --git a/test/functional/ui/messages_spec.lua b/test/functional/ui/messages_spec.lua index c18a07fef0..131622bcc5 100644 --- a/test/functional/ui/messages_spec.lua +++ b/test/functional/ui/messages_spec.lua @@ -1627,13 +1627,41 @@ describe('ui/ext_messages', function() {1:~ }|*5 ]]) - feed('<c-l>') - screen:expect([[ + -- <c-l> (same as :mode) does _not_ clear intro message + feed('<c-l>i') + screen:expect { + grid = [[ ^ | + {1:~ }|*4 + {MATCH:.*}| + {1:~ }| + {1:~ }Nvim is open source and freely distributable{1: }| + {1:~ }https://neovim.io/#chat{1: }| + {1:~ }| + {1:~ }type :help nvim{5:<Enter>} if you are new! {1: }| + {1:~ }type :checkhealth{5:<Enter>} to optimize Nvim{1: }| + {1:~ }type :q{5:<Enter>} to exit {1: }| + {1:~ }type :help{5:<Enter>} for help {1: }| + {1:~ }| + {1:~{MATCH: +}}type :help news{5:<Enter>} to see changes in v{MATCH:%d+%.%d+}{1:{MATCH: +}}| + {1:~ }| + {MATCH:.*}|*2 + {1:~ }|*5 + ]], + showmode = { { '-- INSERT --', 3 } }, + } + + -- but editing text does.. + feed('x') + screen:expect { + grid = [[ + x^ | {1:~ }|*23 - ]]) + ]], + showmode = { { '-- INSERT --', 3 } }, + } - feed(':intro<cr>') + feed('<esc>:intro<cr>') screen:expect { grid = [[ ^ | @@ -1657,6 +1685,14 @@ describe('ui/ext_messages', function() { content = { { 'Press ENTER or type command to continue', 4 } }, kind = 'return_prompt' }, }, } + + feed('<cr>') + screen:expect { + grid = [[ + ^x | + {1:~ }|*23 + ]], + } end) it('supports global statusline', function() |