aboutsummaryrefslogtreecommitdiff
path: root/test/functional
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2019-06-16 12:34:27 +0200
committerGitHub <noreply@github.com>2019-06-16 12:34:27 +0200
commit3d6e48a941acab51d8c045ec325783c0107a5d54 (patch)
tree50a56b49db6e743f46f63047cbaf9d071c34ba25 /test/functional
parent5a96161e8664339c11a904b6f851f44d9c5b49d3 (diff)
parente39d217592d83566bba004dc80120f22f59b544b (diff)
downloadrneovim-3d6e48a941acab51d8c045ec325783c0107a5d54.tar.gz
rneovim-3d6e48a941acab51d8c045ec325783c0107a5d54.tar.bz2
rneovim-3d6e48a941acab51d8c045ec325783c0107a5d54.zip
Merge pull request #10150 from bfredl/extcount
make msg_advance and search_count not crash with ext_messages, fixes #10069
Diffstat (limited to 'test/functional')
-rw-r--r--test/functional/ui/messages_spec.lua45
1 files changed, 45 insertions, 0 deletions
diff --git a/test/functional/ui/messages_spec.lua b/test/functional/ui/messages_spec.lua
index 7d21f40ce9..e6df9885ef 100644
--- a/test/functional/ui/messages_spec.lua
+++ b/test/functional/ui/messages_spec.lua
@@ -21,6 +21,8 @@ describe('ui/ext_messages', function()
[4] = {bold = true, foreground = Screen.colors.SeaGreen4},
[5] = {foreground = Screen.colors.Blue1},
[6] = {bold = true, reverse = true},
+ [7] = {background = Screen.colors.Yellow},
+ [8] = {foreground = Screen.colors.Red},
})
end)
after_each(function()
@@ -303,6 +305,49 @@ describe('ui/ext_messages', function()
}}
end)
+ it('shortmess-=S', function()
+ command('set shortmess-=S')
+ feed('iline 1\nline 2<esc>')
+
+ feed('/line<cr>')
+ screen:expect{grid=[[
+ {7:^line} 1 |
+ {7:line} 2 |
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ ]], messages={
+ {content = {{"/line [1/2] W"}}, kind = "search_count"}
+ }}
+
+ feed('n')
+ screen:expect{grid=[[
+ {7:line} 1 |
+ {7:^line} 2 |
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ ]], messages={
+ {content = {{"/line [2/2]"}}, kind = "search_count"}
+ }}
+ end)
+
+ it("doesn't crash with column adjustment #10069", function()
+ feed(':let [x,y] = [1,2]<cr>')
+ feed(':let x y<cr>')
+ screen:expect{grid=[[
+ ^ |
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ ]], messages={
+ {content = {{ "x #1" }}, kind = ""},
+ {content = {{ "y #2" }}, kind = ""},
+ {content = {{ "Press ENTER or type command to continue", 4 }}, kind = "return_prompt"}
+ }}
+ end)
+
it('&showmode', function()
command('imap <f2> <cmd>echomsg "stuff"<cr>')
feed('i')