aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/statusline_spec.lua
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-01-31 08:48:52 +0800
committerGitHub <noreply@github.com>2024-01-31 08:48:52 +0800
commit9f15a18fa57f540cb3d0d9d2f45d872038e6f990 (patch)
tree5ad96e87a1486f8c6d2a8298246816a237eb9f87 /test/functional/ui/statusline_spec.lua
parent4ffc20c9515294481486e81271a8edeeff203140 (diff)
downloadrneovim-9f15a18fa57f540cb3d0d9d2f45d872038e6f990.tar.gz
rneovim-9f15a18fa57f540cb3d0d9d2f45d872038e6f990.tar.bz2
rneovim-9f15a18fa57f540cb3d0d9d2f45d872038e6f990.zip
fix(statusline): missing offset when showing 'keymap' (#27270)
Diffstat (limited to 'test/functional/ui/statusline_spec.lua')
-rw-r--r--test/functional/ui/statusline_spec.lua55
1 files changed, 55 insertions, 0 deletions
diff --git a/test/functional/ui/statusline_spec.lua b/test/functional/ui/statusline_spec.lua
index 711e056376..fee4b64d44 100644
--- a/test/functional/ui/statusline_spec.lua
+++ b/test/functional/ui/statusline_spec.lua
@@ -720,3 +720,58 @@ it('uses "stl" and "stlnc" fillchars even if they are the same #19803', function
]],
}
end)
+
+it('showcmdloc=statusline works with vertical splits', function()
+ clear()
+ local screen = Screen.new(53, 4)
+ screen:set_default_attr_ids {
+ [1] = { bold = true, foreground = Screen.colors.Blue }, -- NonText
+ [2] = { bold = true, reverse = true }, -- StatusLine
+ [3] = { reverse = true }, -- StatusLineNC
+ }
+ screen:attach()
+ command('rightbelow vsplit')
+ command('set showcmd showcmdloc=statusline')
+ feed('1234')
+ screen:expect([[
+ │^ |
+ {1:~ }│{1:~ }|
+ {3:[No Name] }{2:[No Name] 1234 }|
+ |
+ ]])
+ feed('<Esc>')
+ command('set laststatus=3')
+ feed('1234')
+ screen:expect([[
+ │^ |
+ {1:~ }│{1:~ }|
+ {2:[No Name] 1234 }|
+ |
+ ]])
+end)
+
+it('keymap is shown with vertical splits #27269', function()
+ clear()
+ local screen = Screen.new(53, 4)
+ screen:set_default_attr_ids {
+ [1] = { bold = true, foreground = Screen.colors.Blue }, -- NonText
+ [2] = { bold = true, reverse = true }, -- StatusLine
+ [3] = { reverse = true }, -- StatusLineNC
+ }
+ screen:attach()
+ command('setlocal keymap=dvorak')
+ command('rightbelow vsplit')
+ screen:expect([[
+ │^ |
+ {1:~ }│{1:~ }|
+ {3:[No Name] <en-dv> }{2:[No Name] <en-dv> }|
+ |
+ ]])
+ command('set laststatus=3')
+ screen:expect([[
+ │^ |
+ {1:~ }│{1:~ }|
+ {2:[No Name] <en-dv> }|
+ |
+ ]])
+end)