diff options
author | James McCoy <jamessan@jamessan.com> | 2017-10-23 19:52:23 -0400 |
---|---|---|
committer | James McCoy <jamessan@jamessan.com> | 2017-10-24 19:55:29 -0400 |
commit | f1f7f3b5123edbd312ae92e9510c4c86cfe1171d (patch) | |
tree | 5f6aa20c420ad8eab93bdf51ef8d83e05f99a9a5 /test/functional/ui | |
parent | e35a66d39670d19d50bf732b3058c12e33c77440 (diff) | |
download | rneovim-f1f7f3b5123edbd312ae92e9510c4c86cfe1171d.tar.gz rneovim-f1f7f3b5123edbd312ae92e9510c4c86cfe1171d.tar.bz2 rneovim-f1f7f3b5123edbd312ae92e9510c4c86cfe1171d.zip |
inccommand: Ignore leading modifiers in the command
Diffstat (limited to 'test/functional/ui')
-rw-r--r-- | test/functional/ui/inccommand_spec.lua | 38 |
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") |