diff options
author | Bram Moolenaar <Bram@vim.org> | 2018-05-08 22:01:07 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2018-05-08 22:01:07 +0200 |
commit | 655a82a8d32c2cd248a46c0ce365a4d50e3d56bd (patch) | |
tree | 8af6abf435a1dd67e6718f18c441e761a7180e80 /src | |
parent | 9b50f36e405309be97e28b5e19d81ff0902c5224 (diff) | |
download | vim-git-655a82a8d32c2cd248a46c0ce365a4d50e3d56bd.tar.gz |
patch 8.0.1804: using :normal in terminal window causes problemsv8.0.1804
Problem: Using :normal in terminal window causes problems. (Dominique
Pelle)
Solution: Don't call terminal_loop() for :normal. (closes #2886)
Diffstat (limited to 'src')
-rw-r--r-- | src/evalfunc.c | 2 | ||||
-rw-r--r-- | src/ex_docmd.c | 6 | ||||
-rw-r--r-- | src/proto/ex_docmd.pro | 2 | ||||
-rw-r--r-- | src/version.c | 2 |
4 files changed, 7 insertions, 5 deletions
diff --git a/src/evalfunc.c b/src/evalfunc.c index 259edb8b1..ea5ff8adc 100644 --- a/src/evalfunc.c +++ b/src/evalfunc.c @@ -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; diff --git a/src/ex_docmd.c b/src/ex_docmd.c index 0e2edd65b..82dd0491d 100644 --- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -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) { diff --git a/src/proto/ex_docmd.pro b/src/proto/ex_docmd.pro index acd6b08ed..3a0a9c6b9 100644 --- a/src/proto/ex_docmd.pro +++ b/src/proto/ex_docmd.pro @@ -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); diff --git a/src/version.c b/src/version.c index f0cb29321..deb950667 100644 --- a/src/version.c +++ b/src/version.c @@ -762,6 +762,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1804, +/**/ 1803, /**/ 1802, |