diff options
author | Famiu Haque <famiuhaque@protonmail.com> | 2022-06-12 23:59:04 +0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-12 10:59:04 -0700 |
commit | 2de0d6714497e4259f467516e52852c1016d5318 (patch) | |
tree | 9de048c5eece4b0b7d66b9d0815da41c0ea02c35 /test/functional | |
parent | f4967828f905fa055d0e69d48a7d735d7f967e1e (diff) | |
download | rneovim-2de0d6714497e4259f467516e52852c1016d5318.tar.gz rneovim-2de0d6714497e4259f467516e52852c1016d5318.tar.bz2 rneovim-2de0d6714497e4259f467516e52852c1016d5318.zip |
fix(inccommand): skip split window if not enough room #18937
Command preview now behaves like inccommand=nosplit when there's not
enough room for the preview window to be opened instead of aborting,
which is consistent with old behavior of 'inccommand'.
Diffstat (limited to 'test/functional')
-rw-r--r-- | test/functional/ui/inccommand_spec.lua | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/functional/ui/inccommand_spec.lua b/test/functional/ui/inccommand_spec.lua index b01504db4f..a310069636 100644 --- a/test/functional/ui/inccommand_spec.lua +++ b/test/functional/ui/inccommand_spec.lua @@ -2051,6 +2051,16 @@ describe("'inccommand' split windows", function() end end) + it("don't open if there's not enough room", function() + refresh() + screen:try_resize(40, 3) + feed("gg:%s/tw") + screen:expect([[ + Inc substitution on | + {12:tw}o lines | + :%s/tw^ | + ]]) + end) end) describe("'inccommand' with 'gdefault'", function() |