To: vim_dev@googlegroups.com Subject: Patch 7.4.1758 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.4.1758 Problem: Triggering CursorHoldI when in CTRL-X mode causes problems. Solution: Do not trigger CursorHoldI in CTRL-X mode. Add "!" flag to feedkeys() (test with that didn't work though). Files: src/edit.c, src/eval.c *** ../vim-7.4.1757/src/edit.c 2016-04-20 16:39:14.422613016 +0200 --- src/edit.c 2016-04-20 17:22:44.407656379 +0200 *************** *** 1526,1532 **** #ifdef FEAT_AUTOCMD /* If typed something may trigger CursorHoldI again. */ ! if (c != K_CURSORHOLD) did_cursorhold = FALSE; #endif --- 1526,1537 ---- #ifdef FEAT_AUTOCMD /* If typed something may trigger CursorHoldI again. */ ! if (c != K_CURSORHOLD ! # ifdef FEAT_COMPL_FUNC ! /* but not in CTRL-X mode, a script can't restore the state */ ! && ctrl_x_mode == 0 ! # endif ! ) did_cursorhold = FALSE; #endif *** ../vim-7.4.1757/src/eval.c 2016-04-20 14:59:19.047369459 +0200 --- src/eval.c 2016-04-20 17:19:39.657651757 +0200 *************** *** 11547,11552 **** --- 11547,11553 ---- char_u nbuf[NUMBUFLEN]; int typed = FALSE; int execute = FALSE; + int dangerous = FALSE; char_u *keys_esc; /* This is not allowed in the sandbox. If the commands would still be *************** *** 11569,11574 **** --- 11570,11576 ---- case 't': typed = TRUE; break; case 'i': insert = TRUE; break; case 'x': execute = TRUE; break; + case '!': dangerous = TRUE; break; } } } *************** *** 11592,11600 **** /* Avoid a 1 second delay when the keys start Insert mode. */ msg_scroll = FALSE; ! ++ex_normal_busy; exec_normal(TRUE); ! --ex_normal_busy; msg_scroll |= save_msg_scroll; } } --- 11594,11604 ---- /* Avoid a 1 second delay when the keys start Insert mode. */ msg_scroll = FALSE; ! if (!dangerous) ! ++ex_normal_busy; exec_normal(TRUE); ! if (!dangerous) ! --ex_normal_busy; msg_scroll |= save_msg_scroll; } } *** ../vim-7.4.1757/src/version.c 2016-04-20 16:39:14.422613016 +0200 --- src/version.c 2016-04-20 16:55:49.380395399 +0200 *************** *** 750,751 **** --- 750,753 ---- { /* Add new patch number below this line */ + /**/ + 1758, /**/ -- Shit makes the flowers grow and that's beautiful /// 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 ///