mirror of
https://github.com/neovim/neovim.git
synced 2025-10-26 12:27:24 +00:00
*: Move some dictionary functions to typval.h and use char*
Also fixes buffer reusage in setmatches() and complete().
This commit is contained in:
@@ -3,6 +3,7 @@ local Screen = require('test.functional.ui.screen')
|
||||
local clear, feed = helpers.clear, helpers.feed
|
||||
local eval, eq, neq = helpers.eval, helpers.eq, helpers.neq
|
||||
local execute, source, expect = helpers.execute, helpers.source, helpers.expect
|
||||
local meths = helpers.meths
|
||||
|
||||
if helpers.pending_win32(pending) then return end
|
||||
|
||||
@@ -814,6 +815,41 @@ describe('completion', function()
|
||||
end)
|
||||
end)
|
||||
|
||||
describe('with numeric items', function()
|
||||
before_each(function()
|
||||
source([[
|
||||
function! TestComplete() abort
|
||||
call complete(1, g:_complist)
|
||||
return ''
|
||||
endfunction
|
||||
]])
|
||||
meths.set_option('completeopt', 'menuone,noselect')
|
||||
meths.set_var('_complist', {{
|
||||
word=0,
|
||||
abbr=1,
|
||||
menu=2,
|
||||
kind=3,
|
||||
info=4,
|
||||
icase=5,
|
||||
dup=6,
|
||||
empty=7,
|
||||
}})
|
||||
end)
|
||||
|
||||
it('shows correct variant as word', function()
|
||||
feed('i<C-r>=TestComplete()<CR>')
|
||||
screen:expect([[
|
||||
^ |
|
||||
{1:1 3 2 }{0: }|
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
{3:-- INSERT --} |
|
||||
]])
|
||||
end)
|
||||
end)
|
||||
end)
|
||||
|
||||
describe('External completion popupmenu', function()
|
||||
|
||||
Reference in New Issue
Block a user