diff options
author | KillTheMule <KillTheMule@users.noreply.github.com> | 2017-09-09 11:38:19 +0200 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2017-09-12 22:44:11 +0200 |
commit | 6d0f87a0bd9c683f21c20e29145f375ca77c2792 (patch) | |
tree | 93afedbfa49c9b2553a644a6a5582ef962199bd5 /test | |
parent | d2cbc311855114b7736919a344a82e303d4a8164 (diff) | |
download | rneovim-6d0f87a0bd9c683f21c20e29145f375ca77c2792.tar.gz rneovim-6d0f87a0bd9c683f21c20e29145f375ca77c2792.tar.bz2 rneovim-6d0f87a0bd9c683f21c20e29145f375ca77c2792.zip |
'inccommand': fix 'gdefault' lockup #7261
closes #7244
ref #7249
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/ui/inccommand_spec.lua | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/test/functional/ui/inccommand_spec.lua b/test/functional/ui/inccommand_spec.lua index e83bd72ad3..c8fa2888d1 100644 --- a/test/functional/ui/inccommand_spec.lua +++ b/test/functional/ui/inccommand_spec.lua @@ -14,6 +14,7 @@ local neq = helpers.neq local ok = helpers.ok local source = helpers.source local wait = helpers.wait +local nvim = helpers.nvim local default_text = [[ Inc substitution on @@ -1647,3 +1648,29 @@ describe("'inccommand' split windows", function() end) end) + +describe("'inccommand' with 'gdefault'", function() + before_each(function() + clear() + end) + + it("does not lock up #7244", function() + common_setup(nil, "nosplit", "{") + command("set gdefault") + feed(":s/{\\n") + eq({mode='c', blocking=false}, nvim("get_mode")) + feed("/A<Enter>") + expect("A") + eq({mode='n', blocking=false}, nvim("get_mode")) + end) + + it("with multiline text and range, does not lock up #7244", function() + common_setup(nil, "nosplit", "{\n\n{") + command("set gdefault") + feed(":%s/{\\n") + eq({mode='c', blocking=false}, nvim("get_mode")) + feed("/A<Enter>") + expect("A\nA") + eq({mode='n', blocking=false}, nvim("get_mode")) + end) +end) |