To: vim_dev@googlegroups.com Subject: Patch 8.2.4865 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.4865 Problem: :startinsert right after :stopinsert does not work when popup menu is still visible. Solution: Use ins_compl_active() instead of pum_visible(). (closes #10352) Files: src/edit.c, src/testdir/test_ins_complete.vim *** ../vim-8.2.4864/src/edit.c 2022-04-29 16:43:56.219178196 +0100 --- src/edit.c 2022-05-04 17:47:22.906231857 +0100 *************** *** 448,454 **** if (update_Insstart_orig) Insstart_orig = Insstart; ! if (stop_insert_mode && !pum_visible()) { // ":stopinsert" used or 'insertmode' reset count = 0; --- 448,454 ---- if (update_Insstart_orig) Insstart_orig = Insstart; ! if (stop_insert_mode && !ins_compl_active()) { // ":stopinsert" used or 'insertmode' reset count = 0; *** ../vim-8.2.4864/src/testdir/test_ins_complete.vim 2022-04-07 21:00:49.423544896 +0100 --- src/testdir/test_ins_complete.vim 2022-05-04 17:47:22.906231857 +0100 *************** *** 555,560 **** --- 555,569 ---- call delete('Xpumscript') endfunc + func Test_complete_stopinsert_startinsert() + nnoremap startinsert + inoremap stopinsert + " This just checks if this causes an error + call feedkeys("i\\\\", 'x') + nunmap + iunmap + endfunc + func Test_pum_with_folds_two_tabs() CheckScreendump *** ../vim-8.2.4864/src/version.c 2022-05-04 17:29:07.767382639 +0100 --- src/version.c 2022-05-04 17:49:41.762111907 +0100 *************** *** 748,749 **** --- 748,751 ---- { /* Add new patch number below this line */ + /**/ + 4865, /**/ -- From "know your smileys": :-| :-| Deja' vu! /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///