diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2016-11-09 12:08:49 +0100 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2016-11-10 15:48:00 +0100 |
commit | 2e1217da4617c832afcd7ca90c88b06c200dc23b (patch) | |
tree | 89b918a89238899aa97e8d06314b377909812293 /test | |
parent | 0213e99aaf6eba303fd459183dd14a4a11cc5b07 (diff) | |
download | rneovim-2e1217da4617c832afcd7ca90c88b06c200dc23b.tar.gz rneovim-2e1217da4617c832afcd7ca90c88b06c200dc23b.tar.bz2 rneovim-2e1217da4617c832afcd7ca90c88b06c200dc23b.zip |
'inccommand': buftype=nofile, restore cursor/view
- Use a standard scratch buffer instead of a new 'buftype', functions
like curbufIsChanged() already have special handling for scratch bufs.
- Cleanup some stuff from the previous merge.
- Add support for :smagic, :snomagic. Closes #5578
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/ui/inccommand_spec.lua | 43 |
1 files changed, 39 insertions, 4 deletions
diff --git a/test/functional/ui/inccommand_spec.lua b/test/functional/ui/inccommand_spec.lua index f2282e3fb8..de5f7411da 100644 --- a/test/functional/ui/inccommand_spec.lua +++ b/test/functional/ui/inccommand_spec.lua @@ -944,7 +944,7 @@ describe(":substitute, inccommand=split", function() end) -describe(":substitute, inccommand=nosplit", function() +describe("inccommand=nosplit", function() if helpers.pending_win32(pending) then return end local screen = Screen.new(20,10) @@ -958,7 +958,42 @@ describe(":substitute, inccommand=nosplit", function() if screen then screen:detach() end end) - it('does not show a split window anytime', function() + it("works with :smagic, :snomagic", function() + execute("set hlsearch") + insert("Line *.3.* here") + + feed(":%smagic/3.*/X") -- start :smagic command + screen:expect([[ + Inc substitution on | + two lines | + Inc substitution on | + two lines | + Line *.X | + {15:~ }| + {15:~ }| + {15:~ }| + {15:~ }| + :%smagic/3.*/X^ | + ]]) + + + feed([[<C-\><C-N>]]) -- cancel + feed(":%snomagic/3.*/X") -- start :snomagic command + screen:expect([[ + Inc substitution on | + two lines | + Inc substitution on | + two lines | + Line *.X here | + {15:~ }| + {15:~ }| + {15:~ }| + {15:~ }| + :%snomagic/3.*/X^ | + ]]) + end) + + it('never shows preview buffer', function() execute("set hlsearch") feed(":%s/tw") @@ -1163,7 +1198,7 @@ describe("'inccommand' and :cnoremap", function() end) -describe("'inccommand': autocommands", function() +describe("'inccommand' autocommands", function() before_each(clear) -- keys are events to be tested @@ -1251,7 +1286,7 @@ describe("'inccommand': autocommands", function() end) -describe("'inccommand': split windows", function() +describe("'inccommand' split windows", function() if helpers.pending_win32(pending) then return end local screen |