From 5a490d838ed3288abcf45e16e6ab79c326a67c17 Mon Sep 17 00:00:00 2001 From: Shougo Date: Fri, 1 Jul 2022 10:59:50 +0900 Subject: cmdheight=0: fix bugs #18961 Continue of #16251 Fix #18953 Fix #18960 Fix #18958 Fix #18955 Fix #18970 Fix #18983 Fix #18995 Fix #19112 --- test/functional/ui/cmdline_spec.lua | 72 +++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) (limited to 'test/functional') diff --git a/test/functional/ui/cmdline_spec.lua b/test/functional/ui/cmdline_spec.lua index 0315d2b479..eb0a14da31 100644 --- a/test/functional/ui/cmdline_spec.lua +++ b/test/functional/ui/cmdline_spec.lua @@ -949,6 +949,20 @@ describe('cmdheight=0', function() eq(0, eval('&cmdheight')) end) + it("with cmdheight=0 ruler rulerformat laststatus=0", function() + command("set cmdheight=0 noruler laststatus=0 rulerformat=%l,%c%= showmode") + feed('i') + screen:expect{grid=[[ + ^ | + ~ | + ~ | + ~ | + ~ | + ]], showmode={}} + feed('') + eq(0, eval('&cmdheight')) + end) + it("with showmode", function() command("set cmdheight=1 noruler laststatus=0 showmode") feed('i') @@ -1045,4 +1059,62 @@ describe('cmdheight=0', function() assert_alive() end) + + it("when macro with lastline", function() + command("set cmdheight=0 display=lastline") + feed('qq') + screen:expect{grid=[[ + ^ | + ~ | + ~ | + ~ | + ~ | + ]], showmode={}} + feed('q') + screen:expect{grid=[[ + ^ | + ~ | + ~ | + ~ | + ~ | + ]], showmode={}} + end) + + it("when substitute text", function() + command("set cmdheight=0 noruler laststatus=3") + feed('ifoo') + screen:expect{grid=[[ + fo^o | + ~ | + ~ | + ~ | + [No Name] [+] | + ]]} + + feed(':%s/foo/bar/gc') + screen:expect{grid=[[ + foo | + ~ | + ~ | + [No Name] [+] | + replace wi...q/l/^E/^Y)?^ | + ]]} + + feed('y') + screen:expect{grid=[[ + ^bar | + ~ | + ~ | + ~ | + [No Name] [+] | + ]]} + + assert_alive() + end) + + it("when window resize", function() + command("set cmdheight=0") + feed('+') + eq(0, eval('&cmdheight')) + end) end) -- cgit