comparison src/normal.c @ 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 be40c8a9240d
children bc0fee081e1e
comparison
equal deleted inserted replaced
11891:c978d21753e4 11892:50ad151a7482
9035 * Also handle K_PS, start bracketed paste. 9035 * Also handle K_PS, start bracketed paste.
9036 */ 9036 */
9037 static void 9037 static void
9038 nv_edit(cmdarg_T *cap) 9038 nv_edit(cmdarg_T *cap)
9039 { 9039 {
9040 #ifdef FEAT_TERMINAL
9041 if (term_in_terminal_mode())
9042 {
9043 term_leave_terminal_mode();
9044 return;
9045 }
9046 #endif
9047
9048 /* <Insert> is equal to "i" */ 9040 /* <Insert> is equal to "i" */
9049 if (cap->cmdchar == K_INS || cap->cmdchar == K_KINS) 9041 if (cap->cmdchar == K_INS || cap->cmdchar == K_KINS)
9050 cap->cmdchar = 'i'; 9042 cap->cmdchar = 'i';
9051 9043
9052 /* in Visual mode "A" and "I" are an operator */ 9044 /* in Visual mode "A" and "I" are an operator */
9061 nv_object(cap); 9053 nv_object(cap);
9062 #else 9054 #else
9063 clearopbeep(cap->oap); 9055 clearopbeep(cap->oap);
9064 #endif 9056 #endif
9065 } 9057 }
9058 #ifdef FEAT_TERMINAL
9059 else if (term_in_terminal_mode())
9060 {
9061 clearop(cap->oap);
9062 term_leave_terminal_mode();
9063 return;
9064 }
9065 #endif
9066 else if (!curbuf->b_p_ma && !p_im) 9066 else if (!curbuf->b_p_ma && !p_im)
9067 { 9067 {
9068 /* Only give this error when 'insertmode' is off. */ 9068 /* Only give this error when 'insertmode' is off. */
9069 EMSG(_(e_modifiable)); 9069 EMSG(_(e_modifiable));
9070 clearop(cap->oap); 9070 clearop(cap->oap);