aboutsummaryrefslogtreecommitdiff
path: root/test/functional
diff options
context:
space:
mode:
authorJames McCoy <jamessan@jamessan.com>2017-10-24 20:48:27 -0400
committerGitHub <noreply@github.com>2017-10-24 20:48:27 -0400
commitf0c2f82e90046487a8c12c10ca6c8da23470ef09 (patch)
treeab5b73a1cf79ceb9c489c410e68bfa01736c4827 /test/functional
parentfdd9b1982ba2bce586e30a5a119273aa448bf049 (diff)
parentf1f7f3b5123edbd312ae92e9510c4c86cfe1171d (diff)
downloadrneovim-f0c2f82e90046487a8c12c10ca6c8da23470ef09.tar.gz
rneovim-f0c2f82e90046487a8c12c10ca6c8da23470ef09.tar.bz2
rneovim-f0c2f82e90046487a8c12c10ca6c8da23470ef09.zip
Merge pull request #6967 from jamessan/icm-skip-modifiers
inccommand: Ignore leading modifiers in the command
Diffstat (limited to 'test/functional')
-rw-r--r--test/functional/ui/inccommand_spec.lua38
1 files changed, 38 insertions, 0 deletions
diff --git a/test/functional/ui/inccommand_spec.lua b/test/functional/ui/inccommand_spec.lua
index c8fa2888d1..cc023ef10d 100644
--- a/test/functional/ui/inccommand_spec.lua
+++ b/test/functional/ui/inccommand_spec.lua
@@ -701,6 +701,25 @@ describe(":substitute, inccommand=split", function()
eq(0, eval("&modified"))
end)
+ it("shows preview when cmd modifiers are present", function()
+ -- one modifier
+ feed(':keeppatterns %s/tw/to')
+ screen:expect([[too lines]], nil, nil, nil, true)
+ feed('<Esc>')
+ screen:expect([[two lines]], nil, nil, nil, true)
+
+ -- multiple modifiers
+ feed(':keeppatterns silent %s/tw/to')
+ screen:expect([[too lines]], nil, nil, nil, true)
+ feed('<Esc>')
+ screen:expect([[two lines]], nil, nil, nil, true)
+
+ -- non-modifier prefix
+ feed(':silent tabedit %s/tw/to')
+ screen:expect([[two lines]], nil, nil, nil, true)
+ feed('<Esc>')
+ end)
+
it('shows split window when typing the pattern', function()
feed(":%s/tw")
screen:expect([[
@@ -1140,6 +1159,25 @@ describe("inccommand=nosplit", function()
]])
end)
+ it("shows preview when cmd modifiers are present", function()
+ -- one modifier
+ feed(':keeppatterns %s/tw/to')
+ screen:expect([[too lines]], nil, nil, nil, true)
+ feed('<Esc>')
+ screen:expect([[two lines]], nil, nil, nil, true)
+
+ -- multiple modifiers
+ feed(':keeppatterns silent %s/tw/to')
+ screen:expect([[too lines]], nil, nil, nil, true)
+ feed('<Esc>')
+ screen:expect([[two lines]], nil, nil, nil, true)
+
+ -- non-modifier prefix
+ feed(':silent tabedit %s/tw/to')
+ screen:expect([[two lines]], nil, nil, nil, true)
+ feed('<Esc>')
+ end)
+
it('never shows preview buffer', function()
feed_command("set hlsearch")