diff options
author | Josh Rahm <rahm@google.com> | 2022-10-11 19:00:34 +0000 |
---|---|---|
committer | Josh Rahm <rahm@google.com> | 2022-10-11 19:00:34 +0000 |
commit | c367400b73d207833d51e09d663f969ffab37531 (patch) | |
tree | bc26006d942509a92b514107f9d8dca6d3911128 /test/functional/ui/messages_spec.lua | |
parent | 4066fa85abef16fa23c30e94dc4d2bfb3b9c4545 (diff) | |
parent | 760b399f6c0c6470daa0663752bd22886997f9e6 (diff) | |
download | rneovim-c367400b73d207833d51e09d663f969ffab37531.tar.gz rneovim-c367400b73d207833d51e09d663f969ffab37531.tar.bz2 rneovim-c367400b73d207833d51e09d663f969ffab37531.zip |
Merge remote-tracking branch 'upstream/master' into colorcolchar
Diffstat (limited to 'test/functional/ui/messages_spec.lua')
-rw-r--r-- | test/functional/ui/messages_spec.lua | 77 |
1 files changed, 53 insertions, 24 deletions
diff --git a/test/functional/ui/messages_spec.lua b/test/functional/ui/messages_spec.lua index 522c9ccba2..0898d7fe75 100644 --- a/test/functional/ui/messages_spec.lua +++ b/test/functional/ui/messages_spec.lua @@ -869,7 +869,7 @@ stack traceback: {1:~ }| {1:~ }| ]], messages={ - { content = { { "wow, ", 7 }, { "such\n\nvery ", 2 }, { "color", 10 } }, kind = "" } + { content = { { "wow, ", 7 }, { "such\n\nvery ", 2 }, { "color", 10 } }, kind = "echomsg" } }} feed ':ls<cr>' @@ -880,7 +880,7 @@ stack traceback: {1:~ }| {1:~ }| ]], messages={ - { content = { { '\n 1 %a "[No Name]" line 1' } }, kind = "echomsg" } + { content = { { '\n 1 %a "[No Name]" line 1' } }, kind = "" } }} feed ':messages<cr>' @@ -1200,28 +1200,6 @@ vimComment xxx match /\s"[^\-:.%#=*].*$/ms=s+1,lc=1 excludenl contains=@vim it('prints lines in Ex mode correctly with a burst of carriage returns #19341', function() command('set number') meths.buf_set_lines(0, 0, 0, true, {'aaa', 'bbb', 'ccc'}) - command('set display-=msgsep') - feed('gggQ<CR><CR>1<CR><CR>vi') - screen:expect([[ - Entering Ex mode. Type "visual" to go to Normal mode. | - {11: 2 }bbb | - {11: 3 }ccc | - :1 | - {11: 1 }aaa | - {11: 2 }bbb | - :vi^ | - ]]) - feed('<CR>') - screen:expect([[ - {11: 1 }aaa | - {11: 2 }^bbb | - {11: 3 }ccc | - {11: 4 } | - {1:~ }| - {1:~ }| - | - ]]) - command('set display+=msgsep') feed('gggQ<CR><CR>1<CR><CR>vi') screen:expect([[ Entering Ex mode. Type "visual" to go to Normal mode. | @@ -2020,4 +1998,55 @@ aliquip ex ea commodo consequat.]]) | ]]} end) + + it('with cmdheight=0 does not crash with g<', function() + command('set cmdheight=0') + feed(':ls<cr>') + screen:expect{grid=[[ + | + {1:~ }| + {12: }| + :ls | + 1 %a "[No Name]" | + line 1 | + {4:Press ENTER or type command to cont}| + {4:inue}^ | + ]]} + + feed('<cr>') + screen:expect{grid=[[ + ^ | + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + ]]} + + feed('g<lt>') + screen:expect{grid=[[ + | + {1:~ }| + {12: }| + :ls | + 1 %a "[No Name]" | + line 1 | + {4:Press ENTER or type command to cont}| + {4:inue}^ | + ]]} + + feed('<cr>') + screen:expect{grid=[[ + ^ | + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + ]]} + end) end) |