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/editor/completion_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/editor/completion_spec.lua')
-rw-r--r-- | test/functional/editor/completion_spec.lua | 49 |
1 files changed, 48 insertions, 1 deletions
diff --git a/test/functional/editor/completion_spec.lua b/test/functional/editor/completion_spec.lua index 6cdac3c079..22857efe5b 100644 --- a/test/functional/editor/completion_spec.lua +++ b/test/functional/editor/completion_spec.lua @@ -935,6 +935,9 @@ describe('completion', function() eq({'api'}, funcs.getcompletion('vim.ap', 'lua')) eq({'tbl_filter'}, funcs.getcompletion('vim.tbl_fil', 'lua')) eq({'vim'}, funcs.getcompletion('print(vi', 'lua')) + -- fuzzy completion is not supported, so the result should be the same + command('set wildoptions+=fuzzy') + eq({'vim'}, funcs.getcompletion('vi', 'lua')) end) end) @@ -1029,7 +1032,8 @@ describe('completion', function() ]]) end) - it('TextChangedP autocommand', function() + -- oldtest: Test_ChangedP() + it('TextChangedI and TextChangedP autocommands', function() curbufmeths.set_lines(0, 1, false, { 'foo', 'bar', 'foobar'}) source([[ set complete=. completeopt=menuone @@ -1128,6 +1132,49 @@ describe('completion', function() call cursor(4, 1) ]]) + -- v:event.size should be set with ext_popupmenu #20646 + screen:set_option('ext_popupmenu', true) + feed('Sf<C-N>') + screen:expect({grid = [[ + foo | + bar | + foobar | + f^ | + {0:~ }| + {0:~ }| + {0:~ }| + {3:-- Keyword completion (^N^P) }{5:Back at original} | + ]], popupmenu = { + anchor = { 1, 3, 0 }, + items = { { "foo", "", "", "" }, { "foobar", "", "", "" } }, + pos = -1 + }}) + eq({completed_item = {}, width = 0, + height = 2, size = 2, + col = 0, row = 4, scrollbar = false}, + eval('g:event')) + feed('oob') + screen:expect({grid = [[ + foo | + bar | + foobar | + foob^ | + {0:~ }| + {0:~ }| + {0:~ }| + {3:-- Keyword completion (^N^P) }{5:Back at original} | + ]], popupmenu = { + anchor = { 1, 3, 0 }, + items = { { "foobar", "", "", "" } }, + pos = -1 + }}) + eq({completed_item = {}, width = 0, + height = 1, size = 1, + col = 0, row = 4, scrollbar = false}, + eval('g:event')) + feed('<Esc>') + screen:set_option('ext_popupmenu', false) + feed('Sf<C-N>') screen:expect([[ foo | |