comparison src/testdir/test_popup.vim @ 9467:5fb484647e12 v7.4.2014

commit https://github.com/vim/vim/commit/32b808a4bdf35b0dea63c735702a591e5869fecd Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jul 9 21:57:20 2016 +0200 patch 7.4.2014 Problem: Using "noinsert" in 'completeopt' does not insert match. Solution: Set compl_enter_selects. (Shougo, closes https://github.com/vim/vim/issues/875)
author Christian Brabandt <cb@256bit.org>
date Sat, 09 Jul 2016 22:00:07 +0200
parents 203792348947
children 0b0b9864c811
comparison
equal deleted inserted replaced
9466:d5ccc59b203f 9467:5fb484647e12
47 set completeopt+=noinsert 47 set completeopt+=noinsert
48 inoremap <F5> <C-R>=ComplTest()<CR> 48 inoremap <F5> <C-R>=ComplTest()<CR>
49 call feedkeys("i\<F5>soun\<CR>\<CR>\<ESC>.", 'tx') 49 call feedkeys("i\<F5>soun\<CR>\<CR>\<ESC>.", 'tx')
50 call assert_equal('soundfold', getline(1)) 50 call assert_equal('soundfold', getline(1))
51 call assert_equal('soundfold', getline(2)) 51 call assert_equal('soundfold', getline(2))
52 bwipe!
52 53
54 new
55 inoremap <F5> <C-R>=Test()<CR>
56 call feedkeys("i\<F5>\<CR>\<ESC>", 'tx')
57 call assert_equal('source', getline(1))
53 bwipe! 58 bwipe!
59
54 set completeopt-=noinsert 60 set completeopt-=noinsert
55 iunmap <F5> 61 iunmap <F5>
56 endfunc 62 endfunc
63
64
65 function! Test() abort
66 call complete(1, ['source', 'soundfold'])
67 return ''
68 endfunction