]> granicus.if.org Git - vim/commitdiff
patch 8.0.1804: using :normal in terminal window causes problems v8.0.1804
authorBram Moolenaar <Bram@vim.org>
Tue, 8 May 2018 20:01:07 +0000 (22:01 +0200)
committerBram Moolenaar <Bram@vim.org>
Tue, 8 May 2018 20:01:07 +0000 (22:01 +0200)
Problem:    Using :normal in terminal window causes problems. (Dominique
            Pelle)
Solution:   Don't call terminal_loop() for :normal. (closes #2886)

src/evalfunc.c
src/ex_docmd.c
src/proto/ex_docmd.pro
src/version.c

index 259edb8b1fed0e5fa36323e3e91542f6d9d560b4..ea5ff8adc7099d0b2e92f356864d88d3e1fc5fe6 100644 (file)
@@ -3313,7 +3313,7 @@ f_feedkeys(typval_T *argvars, typval_T *rettv UNUSED)
 
                if (!dangerous)
                    ++ex_normal_busy;
-               exec_normal(TRUE);
+               exec_normal(TRUE, TRUE);
                if (!dangerous)
                    --ex_normal_busy;
 
index 0e2edd65b2d5ac85d14940436be7efa7c3cd1c22..82dd0491d4d282a317de9d96b1f9f3f94774aa7e 100644 (file)
@@ -10323,14 +10323,14 @@ exec_normal_cmd(char_u *cmd, int remap, int silent)
 {
     /* Stuff the argument into the typeahead buffer. */
     ins_typebuf(cmd, remap, 0, TRUE, silent);
-    exec_normal(FALSE);
+    exec_normal(FALSE, FALSE);
 }
 
 /*
  * Execute normal_cmd() until there is no typeahead left.
  */
     void
-exec_normal(int was_typed)
+exec_normal(int was_typed, int may_use_terminal_loop UNUSED)
 {
     oparg_T    oa;
 
@@ -10341,7 +10341,7 @@ exec_normal(int was_typed)
     {
        update_topline_cursor();
 #ifdef FEAT_TERMINAL
-       if (term_use_loop()
+       if (may_use_terminal_loop && term_use_loop()
                && oa.op_type == OP_NOP && oa.regname == NUL
                && !VIsual_active)
        {
index acd6b08ed820a984568a9e16c159a90d3e45f2f1..3a0a9c6b9b3d85aa35724e68de1c64bbb28adc06 100644 (file)
@@ -56,7 +56,7 @@ int save_current_state(save_state_T *sst);
 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);
+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);
index f0cb29321ea4d5ddf49e4c8ca62d28b46c578afe..deb9506674b42d30ba1db4be8d1964112f3c22ad 100644 (file)
@@ -761,6 +761,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1804,
 /**/
     1803,
 /**/