aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui
diff options
context:
space:
mode:
authorckelsel <ckelsel@hotmail.com>2017-09-17 20:41:47 +0800
committerckelsel <ckelsel@hotmail.com>2017-09-17 20:41:47 +0800
commit6258e33b114dc4386e608a5cf3a48742757441f7 (patch)
tree18521f17269e5f911748194dbdcf48371b4e036e /test/functional/ui
parentbf80a68d0d0a093c4764b53eb69e43cbb4363af2 (diff)
parent9d6bac3219a0cc1647b560b0d28b0a3fce9dc96a (diff)
downloadrneovim-6258e33b114dc4386e608a5cf3a48742757441f7.tar.gz
rneovim-6258e33b114dc4386e608a5cf3a48742757441f7.tar.bz2
rneovim-6258e33b114dc4386e608a5cf3a48742757441f7.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'test/functional/ui')
-rw-r--r--test/functional/ui/inccommand_spec.lua27
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)