diff options
author | Shougo <Shougo.Matsu@gmail.com> | 2016-11-16 01:59:55 +0900 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2016-11-15 17:59:55 +0100 |
commit | c69cfd7d1c12fa895961289c7b2fcbeccff5a739 (patch) | |
tree | 80274c8d7b89d488cd75f8a6d3db49a2fc2938ec /test/functional/legacy/076_completefunc_spec.lua | |
parent | 10c72cd3658e17aafa41b5752c23d97df88fc71f (diff) | |
download | rneovim-c69cfd7d1c12fa895961289c7b2fcbeccff5a739.tar.gz rneovim-c69cfd7d1c12fa895961289c7b2fcbeccff5a739.tar.bz2 rneovim-c69cfd7d1c12fa895961289c7b2fcbeccff5a739.zip |
vim-patch:8.0.0035 (#5609)
Problem: Order of matches for 'omnifunc' is messed up. (Danny Su)
Solution: Do not set compl_curr_match when called from complete_check().
(closes vim/vim#1168)
https://github.com/vim/vim/commit/472e85970ee3a80abd824bef510df12e9cfe9e96
Diffstat (limited to 'test/functional/legacy/076_completefunc_spec.lua')
-rw-r--r-- | test/functional/legacy/076_completefunc_spec.lua | 68 |
1 files changed, 0 insertions, 68 deletions
diff --git a/test/functional/legacy/076_completefunc_spec.lua b/test/functional/legacy/076_completefunc_spec.lua deleted file mode 100644 index bf3f56eb84..0000000000 --- a/test/functional/legacy/076_completefunc_spec.lua +++ /dev/null @@ -1,68 +0,0 @@ --- Tests for completefunc/omnifunc. - -local helpers = require('test.functional.helpers')(after_each) -local feed, insert, source = helpers.feed, helpers.insert, helpers.source -local clear, expect, execute = helpers.clear, helpers.expect, helpers.execute - -describe('completefunc', function() - setup(clear) - - it('is working', function() - insert([=[ - +++ - one - two - three]=]) - - -- Test that nothing happens if the 'completefunc' opens - -- a new window (no completion, no crash). - source([=[ - function! DummyCompleteOne(findstart, base) - if a:findstart - return 0 - else - wincmd n - return ['onedef', 'oneDEF'] - endif - endfunction - setlocal completefunc=DummyCompleteOne - /^one - ]=]) - feed('A<C-X><C-U><C-N><esc>') - execute('q!') - source([=[ - function! DummyCompleteTwo(findstart, base) - if a:findstart - wincmd n - return 0 - else - return ['twodef', 'twoDEF'] - endif - endfunction - setlocal completefunc=DummyCompleteTwo - /^two - ]=]) - feed('A<C-X><C-U><C-N><esc>') - execute('q!') - -- Test that 'completefunc' works when it's OK. - source([=[ - function! DummyCompleteThree(findstart, base) - if a:findstart - return 0 - else - return ['threedef', 'threeDEF'] - endif - endfunction - setlocal completefunc=DummyCompleteThree - /^three - ]=]) - feed('A<C-X><C-U><C-N><esc>') - - -- Assert buffer contents. - expect([=[ - +++ - - two - threeDEF]=]) - end) -end) |