diff options
author | Shougo <Shougo.Matsu@gmail.com> | 2022-07-01 10:59:50 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-30 18:59:50 -0700 |
commit | 5a490d838ed3288abcf45e16e6ab79c326a67c17 (patch) | |
tree | d6084fc7aec13c4324404bb0886ad907c8446ed3 /test/functional/ui/cmdline_spec.lua | |
parent | 3b1423bfa7adc5381af641a6e66fa2ca385ecab4 (diff) | |
download | rneovim-5a490d838ed3288abcf45e16e6ab79c326a67c17.tar.gz rneovim-5a490d838ed3288abcf45e16e6ab79c326a67c17.tar.bz2 rneovim-5a490d838ed3288abcf45e16e6ab79c326a67c17.zip |
cmdheight=0: fix bugs #18961
Continue of #16251
Fix #18953
Fix #18960
Fix #18958
Fix #18955
Fix #18970
Fix #18983
Fix #18995
Fix #19112
Diffstat (limited to 'test/functional/ui/cmdline_spec.lua')
-rw-r--r-- | test/functional/ui/cmdline_spec.lua | 72 |
1 files changed, 72 insertions, 0 deletions
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('<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) |