comparison src/ex_docmd.c @ 13866:4b35f2835ce4 v8.0.1804

patch 8.0.1804: using :normal in terminal window causes problems commit https://github.com/vim/vim/commit/655a82a8d32c2cd248a46c0ce365a4d50e3d56bd Author: Bram Moolenaar <Bram@vim.org> Date: Tue May 8 22:01:07 2018 +0200 patch 8.0.1804: using :normal in terminal window causes problems Problem: Using :normal in terminal window causes problems. (Dominique Pelle) Solution: Don't call terminal_loop() for :normal. (closes #2886)
author Christian Brabandt <cb@256bit.org>
date Tue, 08 May 2018 22:15:05 +0200
parents 044337cbf854
children bccd66fa00c1
comparison
equal deleted inserted replaced
13865:3e1b1d88928e 13866:4b35f2835ce4
10321 void 10321 void
10322 exec_normal_cmd(char_u *cmd, int remap, int silent) 10322 exec_normal_cmd(char_u *cmd, int remap, int silent)
10323 { 10323 {
10324 /* Stuff the argument into the typeahead buffer. */ 10324 /* Stuff the argument into the typeahead buffer. */
10325 ins_typebuf(cmd, remap, 0, TRUE, silent); 10325 ins_typebuf(cmd, remap, 0, TRUE, silent);
10326 exec_normal(FALSE); 10326 exec_normal(FALSE, FALSE);
10327 } 10327 }
10328 10328
10329 /* 10329 /*
10330 * Execute normal_cmd() until there is no typeahead left. 10330 * Execute normal_cmd() until there is no typeahead left.
10331 */ 10331 */
10332 void 10332 void
10333 exec_normal(int was_typed) 10333 exec_normal(int was_typed, int may_use_terminal_loop UNUSED)
10334 { 10334 {
10335 oparg_T oa; 10335 oparg_T oa;
10336 10336
10337 clear_oparg(&oa); 10337 clear_oparg(&oa);
10338 finish_op = FALSE; 10338 finish_op = FALSE;
10339 while ((!stuff_empty() || ((was_typed || !typebuf_typed()) 10339 while ((!stuff_empty() || ((was_typed || !typebuf_typed())
10340 && typebuf.tb_len > 0)) && !got_int) 10340 && typebuf.tb_len > 0)) && !got_int)
10341 { 10341 {
10342 update_topline_cursor(); 10342 update_topline_cursor();
10343 #ifdef FEAT_TERMINAL 10343 #ifdef FEAT_TERMINAL
10344 if (term_use_loop() 10344 if (may_use_terminal_loop && term_use_loop()
10345 && oa.op_type == OP_NOP && oa.regname == NUL 10345 && oa.op_type == OP_NOP && oa.regname == NUL
10346 && !VIsual_active) 10346 && !VIsual_active)
10347 { 10347 {
10348 /* If terminal_loop() returns OK we got a key that is handled 10348 /* If terminal_loop() returns OK we got a key that is handled
10349 * in Normal model. With FAIL we first need to position the 10349 * in Normal model. With FAIL we first need to position the