To: vim_dev@googlegroups.com Subject: Patch 8.0.1804 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.0.1804 Problem: Using :normal in terminal window causes problems. (Dominique Pelle) Solution: Don't call terminal_loop() for :normal. (closes #2886) Files: src/ex_docmd.c, src/proto/ex_docmd.pro, src/evalfunc.c *** ../vim-8.0.1803/src/ex_docmd.c 2018-05-01 18:47:52.988188481 +0200 --- src/ex_docmd.c 2018-05-08 21:57:39.566969553 +0200 *************** *** 10323,10336 **** { /* Stuff the argument into the typeahead buffer. */ ins_typebuf(cmd, remap, 0, TRUE, silent); ! exec_normal(FALSE); } /* * Execute normal_cmd() until there is no typeahead left. */ void ! exec_normal(int was_typed) { oparg_T oa; --- 10323,10336 ---- { /* Stuff the argument into the typeahead buffer. */ ins_typebuf(cmd, remap, 0, TRUE, silent); ! exec_normal(FALSE, FALSE); } /* * Execute normal_cmd() until there is no typeahead left. */ void ! exec_normal(int was_typed, int may_use_terminal_loop UNUSED) { oparg_T oa; *************** *** 10341,10347 **** { update_topline_cursor(); #ifdef FEAT_TERMINAL ! if (term_use_loop() && oa.op_type == OP_NOP && oa.regname == NUL && !VIsual_active) { --- 10341,10347 ---- { update_topline_cursor(); #ifdef FEAT_TERMINAL ! if (may_use_terminal_loop && term_use_loop() && oa.op_type == OP_NOP && oa.regname == NUL && !VIsual_active) { *** ../vim-8.0.1803/src/proto/ex_docmd.pro 2018-04-27 22:53:03.926590734 +0200 --- src/proto/ex_docmd.pro 2018-05-08 21:57:44.986931154 +0200 *************** *** 56,62 **** void restore_current_state(save_state_T *sst); void ex_normal(exarg_T *eap); void exec_normal_cmd(char_u *cmd, int remap, int silent); ! void exec_normal(int was_typed); int find_cmdline_var(char_u *src, int *usedlen); char_u *eval_vars(char_u *src, char_u *srcstart, int *usedlen, linenr_T *lnump, char_u **errormsg, int *escaped); char_u *expand_sfile(char_u *arg); --- 56,62 ---- void restore_current_state(save_state_T *sst); void ex_normal(exarg_T *eap); void exec_normal_cmd(char_u *cmd, int remap, int silent); ! void exec_normal(int was_typed, int may_use_terminal_loop); int find_cmdline_var(char_u *src, int *usedlen); char_u *eval_vars(char_u *src, char_u *srcstart, int *usedlen, linenr_T *lnump, char_u **errormsg, int *escaped); char_u *expand_sfile(char_u *arg); *** ../vim-8.0.1803/src/evalfunc.c 2018-05-01 18:47:52.988188481 +0200 --- src/evalfunc.c 2018-05-08 21:57:28.719046490 +0200 *************** *** 3313,3319 **** if (!dangerous) ++ex_normal_busy; ! exec_normal(TRUE); if (!dangerous) --ex_normal_busy; --- 3313,3319 ---- if (!dangerous) ++ex_normal_busy; ! exec_normal(TRUE, TRUE); if (!dangerous) --ex_normal_busy; *** ../vim-8.0.1803/src/version.c 2018-05-07 20:10:08.375909886 +0200 --- src/version.c 2018-05-08 21:58:35.082577743 +0200 *************** *** 763,764 **** --- 763,766 ---- { /* Add new patch number below this line */ + /**/ + 1804, /**/ -- The early bird gets the worm. The second mouse gets the cheese. /// 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 ///