diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-12-27 11:13:58 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-27 11:13:58 +0800 |
commit | d4af8c6202e8734ef4a3a3dfe249353f8d5ba551 (patch) | |
tree | a80ece9d4162a84bf20cbe230c74c86aad8460ef /test/functional/ui/statusline_spec.lua | |
parent | dae213584939c4144a85b518f8dd8a9a3cd3c282 (diff) | |
download | rneovim-d4af8c6202e8734ef4a3a3dfe249353f8d5ba551.tar.gz rneovim-d4af8c6202e8734ef4a3a3dfe249353f8d5ba551.tar.bz2 rneovim-d4af8c6202e8734ef4a3a3dfe249353f8d5ba551.zip |
fix(statusline): don't show showcmd when not enough space (#21550)
Diffstat (limited to 'test/functional/ui/statusline_spec.lua')
-rw-r--r-- | test/functional/ui/statusline_spec.lua | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test/functional/ui/statusline_spec.lua b/test/functional/ui/statusline_spec.lua index 18391a575d..549ebbde06 100644 --- a/test/functional/ui/statusline_spec.lua +++ b/test/functional/ui/statusline_spec.lua @@ -545,3 +545,29 @@ it('statusline is redrawn with :resize from <Cmd> mapping #19629', function() | ]]) end) + +it('showcmdloc=statusline does not show if statusline is too narrow', function() + clear() + local screen = Screen.new(40, 8) + screen:set_default_attr_ids({ + [0] = {bold = true, foreground = Screen.colors.Blue}, -- NonText + [1] = {bold = true, reverse = true}, -- StatusLine + [2] = {reverse = true}, -- StatusLineNC + }) + screen:attach() + command('set showcmd') + command('set showcmdloc=statusline') + command('1vsplit') + screen:expect([[ + ^ │ | + {0:~}│{0:~ }| + {0:~}│{0:~ }| + {0:~}│{0:~ }| + {0:~}│{0:~ }| + {0:~}│{0:~ }| + {1:< }{2:[No Name] }| + | + ]]) + feed('1234') + screen:expect_unchanged() +end) |