patch 7.4.2014
Problem: Using "noinsert" in 'completeopt' does not insert match.
Solution: Set compl_enter_selects. (Shougo, closes #875)
diff --git a/src/testdir/test_popup.vim b/src/testdir/test_popup.vim
index cefaee2..ea489f9 100644
--- a/src/testdir/test_popup.vim
+++ b/src/testdir/test_popup.vim
@@ -49,8 +49,20 @@
call feedkeys("i\<F5>soun\<CR>\<CR>\<ESC>.", 'tx')
call assert_equal('soundfold', getline(1))
call assert_equal('soundfold', getline(2))
-
bwipe!
+
+ new
+ inoremap <F5> <C-R>=Test()<CR>
+ call feedkeys("i\<F5>\<CR>\<ESC>", 'tx')
+ call assert_equal('source', getline(1))
+ bwipe!
+
set completeopt-=noinsert
iunmap <F5>
endfunc
+
+
+function! Test() abort
+ call complete(1, ['source', 'soundfold'])
+ return ''
+endfunction