aboutsummaryrefslogtreecommitdiff
path: root/test/functional/legacy/window_cmd_spec.lua
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-04-27 09:07:30 +0800
committerGitHub <noreply@github.com>2023-04-27 09:07:30 +0800
commit1fc468aed2809a92769fbdfd6c422c2b9b12a233 (patch)
tree1b25227fa25417e6152e71dc2f033da2cf18f4fd /test/functional/legacy/window_cmd_spec.lua
parent3b0df1780e2c8526bda5dead18ee7cc45925caba (diff)
downloadrneovim-1fc468aed2809a92769fbdfd6c422c2b9b12a233.tar.gz
rneovim-1fc468aed2809a92769fbdfd6c422c2b9b12a233.tar.bz2
rneovim-1fc468aed2809a92769fbdfd6c422c2b9b12a233.zip
vim-patch:9.0.1491: wrong scrolling with ls=0 and :botright split (#23333)
Problem: Wrong scrolling with ls=0 and :botright split. Solution: Add statusline before calling frame_new_height(). (closes vim/vim#12299) https://github.com/vim/vim/commit/fbf2071ac9ef08302a1df86c15f3d4ddbe871243
Diffstat (limited to 'test/functional/legacy/window_cmd_spec.lua')
-rw-r--r--test/functional/legacy/window_cmd_spec.lua29
1 files changed, 29 insertions, 0 deletions
diff --git a/test/functional/legacy/window_cmd_spec.lua b/test/functional/legacy/window_cmd_spec.lua
index c7b5878b92..3a51f7a23f 100644
--- a/test/functional/legacy/window_cmd_spec.lua
+++ b/test/functional/legacy/window_cmd_spec.lua
@@ -3,8 +3,37 @@ local Screen = require('test.functional.ui.screen')
local clear = helpers.clear
local exec = helpers.exec
local exec_lua = helpers.exec_lua
+local command = helpers.command
local feed = helpers.feed
+-- oldtest: Test_window_cmd_ls0_split_scrolling()
+it('scrolling with laststatus=0 and :botright split', function()
+ clear('--cmd', 'set ruler')
+ local screen = Screen.new(40, 10)
+ screen:set_default_attr_ids({
+ [1] = {reverse = true}, -- StatusLineNC
+ })
+ screen:attach()
+ exec([[
+ set laststatus=0
+ call setline(1, range(1, 100))
+ normal! G
+ ]])
+ command('botright split')
+ screen:expect([[
+ 97 |
+ 98 |
+ 99 |
+ 100 |
+ {1:[No Name] [+] 100,1 Bot}|
+ 97 |
+ 98 |
+ 99 |
+ ^100 |
+ 100,1 Bot |
+ ]])
+end)
+
describe('splitkeep', function()
local screen