cmdheight=0: fix bugs #18961

Continue of #16251

Fix #18953
Fix #18960
Fix #18958
Fix #18955
Fix #18970
Fix #18983
Fix #18995
Fix #19112
This commit is contained in:
Shougo
2022-07-01 10:59:50 +09:00
committed by GitHub
parent 3b1423bfa7
commit 5a490d838e
7 changed files with 106 additions and 12 deletions

View File

@@ -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('<Esc>')
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<ESC>')
screen:expect{grid=[[
fo^o |
~ |
~ |
~ |
[No Name] [+] |
]]}
feed(':%s/foo/bar/gc<CR>')
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('<C-w>+')
eq(0, eval('&cmdheight'))
end)
end)