Mercurial > vim
changeset 11892:50ad151a7482 v8.0.0826
patch 8.0.0826: cannot use text objects in Terminal mode
commit https://github.com/vim/vim/commit/662d93866636995c0564d974e554f96e76fb2dd9
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Jul 31 22:56:24 2017 +0200
patch 8.0.0826: cannot use text objects in Terminal mode
Problem: Cannot use text objects in Terminal mode.
Solution: Check for pending operator and Visual mode first. (Yasuhiro
Matsumoto, closes #1906)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Mon, 31 Jul 2017 23:00:05 +0200 |
parents | c978d21753e4 |
children | af79d760d8a1 |
files | src/normal.c src/version.c |
diffstat | 2 files changed, 10 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/src/normal.c +++ b/src/normal.c @@ -9037,14 +9037,6 @@ nv_esc(cmdarg_T *cap) static void nv_edit(cmdarg_T *cap) { -#ifdef FEAT_TERMINAL - if (term_in_terminal_mode()) - { - term_leave_terminal_mode(); - return; - } -#endif - /* <Insert> is equal to "i" */ if (cap->cmdchar == K_INS || cap->cmdchar == K_KINS) cap->cmdchar = 'i'; @@ -9063,6 +9055,14 @@ nv_edit(cmdarg_T *cap) clearopbeep(cap->oap); #endif } +#ifdef FEAT_TERMINAL + else if (term_in_terminal_mode()) + { + clearop(cap->oap); + term_leave_terminal_mode(); + return; + } +#endif else if (!curbuf->b_p_ma && !p_im) { /* Only give this error when 'insertmode' is off. */