diff options
author | Luuk van Baal <luukvbaal@gmail.com> | 2022-12-15 21:23:28 +0100 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2022-12-26 13:15:07 +0800 |
commit | 5b89d480e30367259f82680945572b1406219da5 (patch) | |
tree | 455961489867e2fa0c489a2bd4ff779a90d792fd /test/functional/legacy/tabline_spec.lua | |
parent | 357aab4c65c49a924481a67e17a10bd04c334ab9 (diff) | |
download | rneovim-5b89d480e30367259f82680945572b1406219da5.tar.gz rneovim-5b89d480e30367259f82680945572b1406219da5.tar.bz2 rneovim-5b89d480e30367259f82680945572b1406219da5.zip |
vim-patch:9.0.1061: cannot display 'showcmd' somewhere else
Problem: Cannot display 'showcmd' somewhere else.
Solution: Add the 'showcmdloc' option. (Luuk van Baal, closes vim/vim#11684)
https://github.com/vim/vim/commit/ba936f6f4e85cc1408bc3967f9fd7665d948909b
Co-authored-by: Luuk van Baal <luukvbaal@gmail.com>
Diffstat (limited to 'test/functional/legacy/tabline_spec.lua')
-rw-r--r-- | test/functional/legacy/tabline_spec.lua | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/test/functional/legacy/tabline_spec.lua b/test/functional/legacy/tabline_spec.lua new file mode 100644 index 0000000000..d858f137c5 --- /dev/null +++ b/test/functional/legacy/tabline_spec.lua @@ -0,0 +1,53 @@ +local helpers = require('test.functional.helpers')(after_each) +local Screen = require('test.functional.ui.screen') +local clear = helpers.clear +local exec = helpers.exec +local feed = helpers.feed + +before_each(clear) + +describe('tabline', function() + local screen + + before_each(function() + screen = Screen.new(50, 7) + screen:attach() + end) + + -- oldtest: Test_tabline_showcmd() + it('showcmdloc=tabline works', function() + screen:set_default_attr_ids({ + [0] = {bold = true, foreground = Screen.colors.Blue}, -- NonText + [1] = {background = Screen.colors.LightGrey}, -- Visual + [2] = {bold = true}, -- MoreMsg, TabLineSel + [3] = {reverse = true}, -- TabLineFill + [4] = {background = Screen.colors.LightGrey, underline = true}, -- TabLine + }) + exec([[ + set showcmd + set showtabline=2 + set showcmdloc=tabline + call setline(1, ['a', 'b', 'c']) + ]]) + feed('<C-V>Gl') + screen:expect([[ + {2: + [No Name] }{3: }{4:3x2}{3: }| + {1:a} | + {1:b} | + {1:c}^ | + {0:~ }| + {0:~ }| + {2:-- VISUAL BLOCK --} | + ]]) + feed('<Esc>1234') + screen:expect([[ + {2: + [No Name] }{3: }{4:1234}{3: }| + a | + b | + ^c | + {0:~ }| + {0:~ }| + | + ]]) + end) +end) |