aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-08-02 20:48:41 +0800
committerGitHub <noreply@github.com>2022-08-02 20:48:41 +0800
commitdef0ced4c7207ee38d77f146e1527f283e44b6f2 (patch)
treeae235ec9323900433e028084594f3b4dac4ba787 /test
parent8ce7e7409f10f0a90ed8aa3f6f179c4b5d44eacb (diff)
downloadrneovim-def0ced4c7207ee38d77f146e1527f283e44b6f2.tar.gz
rneovim-def0ced4c7207ee38d77f146e1527f283e44b6f2.tar.bz2
rneovim-def0ced4c7207ee38d77f146e1527f283e44b6f2.zip
fix(tabpage): check if ROWS_AVAIL changed for resize (#19620)
N/A patches for version.c: vim-patch:9.0.0135: comment about tabpage line above the wrong code Problem: Comment about tabpage line above the wrong code. Solution: Move the comment. (closes vim/vim#10836) https://github.com/vim/vim/commit/0b0ccbbfb014e1c9682b86a7a41ff2837b0b8047
Diffstat (limited to 'test')
-rw-r--r--test/functional/editor/tabpage_spec.lua41
1 files changed, 41 insertions, 0 deletions
diff --git a/test/functional/editor/tabpage_spec.lua b/test/functional/editor/tabpage_spec.lua
index 3b2c1db350..7dd0b9f154 100644
--- a/test/functional/editor/tabpage_spec.lua
+++ b/test/functional/editor/tabpage_spec.lua
@@ -1,4 +1,5 @@
local helpers = require('test.functional.helpers')(after_each)
+local Screen = require('test.functional.ui.screen')
local clear = helpers.clear
local command = helpers.command
@@ -53,6 +54,46 @@ describe('tabpage', function()
neq(999, eval('g:win_closed'))
end)
+ it('switching tabpage after setting laststatus=3 #19591', function()
+ local screen = Screen.new(40, 8)
+ screen:set_default_attr_ids({
+ [0] = {bold = true, foreground = Screen.colors.Blue},
+ [1] = {bold = true, reverse = true}, -- StatusLine
+ [2] = {reverse = true}, -- StatusLineNC, TabLineFill
+ [3] = {bold = true}, -- TabLineSel
+ [4] = {background = Screen.colors.LightGrey, underline = true}, -- TabLine
+ [5] = {bold = true, foreground = Screen.colors.Magenta},
+ })
+ screen:attach()
+
+ command('tabnew')
+ command('tabprev')
+ command('set laststatus=3')
+ command('tabnext')
+ feed('<C-G>')
+ screen:expect([[
+ {4: [No Name] }{3: [No Name] }{2: }{4:X}|
+ ^ |
+ {0:~ }|
+ {0:~ }|
+ {0:~ }|
+ {0:~ }|
+ {1:[No Name] }|
+ "[No Name]" --No lines in buffer-- |
+ ]])
+ command('vnew')
+ screen:expect([[
+ {4: [No Name] }{3: }{5:2}{3: [No Name] }{2: }{4:X}|
+ ^ │ |
+ {0:~ }│{0:~ }|
+ {0:~ }│{0:~ }|
+ {0:~ }│{0:~ }|
+ {0:~ }│{0:~ }|
+ {1:[No Name] }|
+ "[No Name]" --No lines in buffer-- |
+ ]])
+ end)
+
it(":tabmove handles modifiers and addr", function()
command('tabnew | tabnew | tabnew')
eq(4, funcs.nvim_tabpage_get_number(0))