mirror of
https://github.com/neovim/neovim.git
synced 2026-07-20 16:11:58 +00:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user