diff options
author | Josh Rahm <joshuarahm@gmail.com> | 2023-01-25 18:31:31 +0000 |
---|---|---|
committer | Josh Rahm <joshuarahm@gmail.com> | 2023-01-25 18:31:31 +0000 |
commit | 9243becbedbb6a1592208051f8fa2b090dcc5e7d (patch) | |
tree | 607c2a862ec3f4399b8766383f6f8e04c4aa43b4 /test/functional/legacy/statusline_spec.lua | |
parent | 9e40b6e9e1bc67f2d856adb837ee64dd0e25b717 (diff) | |
parent | 3c48d3c83fc21dbc0841f9210f04bdb073d73cd1 (diff) | |
download | rneovim-usermarks.tar.gz rneovim-usermarks.tar.bz2 rneovim-usermarks.zip |
Merge remote-tracking branch 'upstream/master' into usermarksusermarks
Diffstat (limited to 'test/functional/legacy/statusline_spec.lua')
-rw-r--r-- | test/functional/legacy/statusline_spec.lua | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/test/functional/legacy/statusline_spec.lua b/test/functional/legacy/statusline_spec.lua index e2b30a7c82..c5b17f8749 100644 --- a/test/functional/legacy/statusline_spec.lua +++ b/test/functional/legacy/statusline_spec.lua @@ -68,4 +68,87 @@ describe('statusline', function() | ]]) end) + + -- oldtest: Test_statusline_showcmd() + it('showcmdloc=statusline 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 + [3] = {bold = true, reverse = true}, -- StatusLine + [5] = {background = Screen.colors.LightGrey, foreground = Screen.colors.DarkBlue}, -- Folded + }) + exec([[ + func MyStatusLine() + return '%S' + endfunc + + set showcmd + set laststatus=2 + set statusline=%S + set showcmdloc=statusline + call setline(1, ['a', 'b', 'c']) + set foldopen+=jump + 1,2fold + 3 + ]]) + + feed('g') + screen:expect([[ + {5:+-- 2 lines: a···································}| + ^c | + {0:~ }| + {0:~ }| + {0:~ }| + {3:g }| + | + ]]) + + -- typing "gg" should open the fold + feed('g') + screen:expect([[ + ^a | + b | + c | + {0:~ }| + {0:~ }| + {3: }| + | + ]]) + + feed('<C-V>Gl') + screen:expect([[ + {1:a} | + {1:b} | + {1:c}^ | + {0:~ }| + {0:~ }| + {3:3x2 }| + {2:-- VISUAL BLOCK --} | + ]]) + + feed('<Esc>1234') + screen:expect([[ + a | + b | + ^c | + {0:~ }| + {0:~ }| + {3:1234 }| + | + ]]) + + feed('<Esc>:set statusline=<CR>') + feed(':<CR>') + feed('1234') + screen:expect([[ + a | + b | + ^c | + {0:~ }| + {0:~ }| + {3:[No Name] [+] 1234 }| + : | + ]]) + end) end) |