diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2020-12-01 17:32:48 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-01 17:32:48 +0100 |
commit | f88c2490c7971e7f8889e60316ff3767b1a3f92c (patch) | |
tree | 78e83b7a742c708d3655b77f39fe89334d40b3e9 /test/functional/ui/wildmode_spec.lua | |
parent | 70d0bee7655d70e4417143e45ec7b0cf3f92d9d3 (diff) | |
parent | bed9839f46047abd81f7c9b56936ba177829221c (diff) | |
download | rneovim-f88c2490c7971e7f8889e60316ff3767b1a3f92c.tar.gz rneovim-f88c2490c7971e7f8889e60316ff3767b1a3f92c.tar.bz2 rneovim-f88c2490c7971e7f8889e60316ff3767b1a3f92c.zip |
Merge pull request #13425 from bfredl/secretcharm
ex_getln: add secret charm
Diffstat (limited to 'test/functional/ui/wildmode_spec.lua')
-rw-r--r-- | test/functional/ui/wildmode_spec.lua | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/test/functional/ui/wildmode_spec.lua b/test/functional/ui/wildmode_spec.lua index 99ebc4971e..85c3f8c2de 100644 --- a/test/functional/ui/wildmode_spec.lua +++ b/test/functional/ui/wildmode_spec.lua @@ -3,6 +3,7 @@ local Screen = require('test.functional.ui.screen') local clear, feed, command = helpers.clear, helpers.feed, helpers.command local iswin = helpers.iswin local funcs = helpers.funcs +local meths = helpers.meths local eq = helpers.eq local eval = helpers.eval local retry = helpers.retry @@ -396,6 +397,64 @@ describe("'wildmenu'", function() | ]]) end) + + it('works with c_CTRL_Z standard mapping', function() + screen:set_default_attr_ids { + [1] = {bold = true, foreground = Screen.colors.Blue1}; + [2] = {foreground = Screen.colors.Grey0, background = Screen.colors.Yellow}; + [3] = {bold = true, reverse = true}; + } + + -- Wildcharm? where we are going we aint't no need no wildcharm. + eq(0, meths.get_option'wildcharm') + -- Don't mess the defaults yet (neovim is about backwards compatibility) + eq(9, meths.get_option'wildchar') + -- Lol what is cnoremap? Some say it can define mappings. + command 'set wildchar=0' + eq(0, meths.get_option'wildchar') + + command 'cnoremap <f2> <c-z>' + feed(':syntax <f2>') + screen:expect{grid=[[ + | + {1:~ }| + {1:~ }| + {2:case}{3: clear cluster > }| + :syntax case^ | + ]]} + feed '<esc>' + + command 'set wildmode=longest:full,full' + -- this will get cleaner once we have native lua expr mappings: + command [[cnoremap <expr> <tab> luaeval("not rawset(_G, 'coin', not coin).coin") ? "<c-z>" : "c"]] + + feed ':syntax <tab>' + screen:expect{grid=[[ + | + {1:~ }| + {1:~ }| + {1:~ }| + :syntax c^ | + ]]} + + feed '<tab>' + screen:expect{grid=[[ + | + {1:~ }| + {1:~ }| + {3:case clear cluster > }| + :syntax c^ | + ]]} + + feed '<tab>' + screen:expect{grid=[[ + | + {1:~ }| + {1:~ }| + {1:~ }| + :syntax cc^ | + ]]} + end) end) describe('command line completion', function() |