To: vim_dev@googlegroups.com Subject: Patch 7.4.1692 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.4.1692 Problem: feedkeys('i', 'x') gets stuck, waits for a character to be typed. Solution: Behave like ":normal". (Yasuhiro Matsumoto) Files: src/eval.c, src/testdir/test_feedkeys.vim *** ../vim-7.4.1691/src/eval.c 2016-03-31 22:27:36.660109374 +0200 --- src/eval.c 2016-04-01 20:57:35.720664698 +0200 *************** *** 11368,11374 **** --- 11368,11377 ---- /* 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; } } *** ../vim-7.4.1691/src/testdir/test_feedkeys.vim 2016-03-10 22:19:40.880775414 +0100 --- src/testdir/test_feedkeys.vim 2016-04-01 20:58:14.876264466 +0200 *************** *** 6,10 **** --- 6,14 ---- call assert_equal('', getline('.')) call feedkeys('', 'x') call assert_equal('foo', getline('.')) + + " check it goes back to normal mode immediately. + call feedkeys('i', 'x') + call assert_equal('foo', getline('.')) quit! endfunc *** ../vim-7.4.1691/src/version.c 2016-03-31 23:02:11.658763051 +0200 --- src/version.c 2016-04-01 20:56:59.045039596 +0200 *************** *** 750,751 **** --- 750,753 ---- { /* Add new patch number below this line */ + /**/ + 1692, /**/ -- Rule #1: Don't give somebody a tool that he's going to hurt himself with. /// 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 ///