To: vim_dev@googlegroups.com Subject: Patch 7.4.2014 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.4.2014 Problem: Using "noinsert" in 'completeopt' does not insert match. Solution: Set compl_enter_selects. (Shougo, closes #875) Files: src/edit.c, src/testdir/test_popup.vim *** ../vim-7.4.2013/src/edit.c 2016-07-09 21:48:59.702071022 +0200 --- src/edit.c 2016-07-09 21:51:14.168060060 +0200 *************** *** 2831,2836 **** --- 2831,2837 ---- } else ins_complete(Ctrl_N, FALSE); + compl_enter_selects = compl_no_insert; /* Lazily show the popup menu, unless we got interrupted. */ if (!compl_interrupted) *** ../vim-7.4.2013/src/testdir/test_popup.vim 2016-07-09 21:48:59.702071022 +0200 --- src/testdir/test_popup.vim 2016-07-09 21:54:03.469528319 +0200 *************** *** 49,56 **** --- 49,68 ---- call feedkeys("i\soun\\\.", 'tx') call assert_equal('soundfold', getline(1)) call assert_equal('soundfold', getline(2)) + bwipe! + new + inoremap =Test() + call feedkeys("i\\\", 'tx') + call assert_equal('source', getline(1)) bwipe! + set completeopt-=noinsert iunmap endfunc + + + function! Test() abort + call complete(1, ['source', 'soundfold']) + return '' + endfunction *** ../vim-7.4.2013/src/version.c 2016-07-09 21:48:59.702071022 +0200 --- src/version.c 2016-07-09 21:54:55.776746158 +0200 *************** *** 760,761 **** --- 760,763 ---- { /* Add new patch number below this line */ + /**/ + 2014, /**/ -- If VIM were a woman, I'd marry her. Slim, organized, helpful and beautiful; what's not to like? --David A. Rogers /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///