To: vim_dev@googlegroups.com Subject: Patch 8.1.0082 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.1.0082 Problem: In terminal window, typing : at more prompt, inserts ':' instead of starting another Ex command. Solution: Add skip_term_loop and set it when putting ':' in the typeahead buffer. Files: src/globals.h, src/main.c, src/message.c *** ../vim-8.1.0081/src/globals.h 2018-05-22 20:35:13.558009273 +0200 --- src/globals.h 2018-06-19 17:38:48.904146780 +0200 *************** *** 371,376 **** --- 371,381 ---- # endif # endif #endif + #ifdef FEAT_TERMINAL + // When TRUE skip calling terminal_loop() once. Used when + // typing ':' at the more prompt. + EXTERN int skip_term_loop INIT(= FALSE); + #endif #ifdef FEAT_GUI EXTERN char_u *use_gvimrc INIT(= NULL); /* "-U" cmdline argument */ #endif *** ../vim-8.1.0081/src/main.c 2018-05-05 15:04:42.000000000 +0200 --- src/main.c 2018-06-19 17:34:55.649828513 +0200 *************** *** 1339,1345 **** #ifdef FEAT_TERMINAL if (term_use_loop() && oa.op_type == OP_NOP && oa.regname == NUL ! && !VIsual_active) { /* If terminal_loop() returns OK we got a key that is handled * in Normal model. With FAIL we first need to position the --- 1339,1346 ---- #ifdef FEAT_TERMINAL if (term_use_loop() && oa.op_type == OP_NOP && oa.regname == NUL ! && !VIsual_active ! && !skip_term_loop) { /* If terminal_loop() returns OK we got a key that is handled * in Normal model. With FAIL we first need to position the *************** *** 1349,1355 **** --- 1350,1361 ---- } else #endif + { + #ifdef FEAT_TERMINAL + skip_term_loop = FALSE; + #endif normal_cmd(&oa, TRUE); + } } } } *************** *** 3320,3326 **** main_msg(_("-dev \t\tUse for I/O")); #endif #ifdef FEAT_ARABIC ! main_msg(_("-A\t\t\tstart in Arabic mode")); #endif #ifdef FEAT_RIGHTLEFT main_msg(_("-H\t\t\tStart in Hebrew mode")); --- 3326,3332 ---- main_msg(_("-dev \t\tUse for I/O")); #endif #ifdef FEAT_ARABIC ! main_msg(_("-A\t\t\tStart in Arabic mode")); #endif #ifdef FEAT_RIGHTLEFT main_msg(_("-H\t\t\tStart in Hebrew mode")); *** ../vim-8.1.0081/src/message.c 2018-05-22 20:35:13.562009272 +0200 --- src/message.c 2018-06-19 17:39:40.111793123 +0200 *************** *** 1219,1224 **** --- 1219,1227 ---- cmdline_row = msg_row; skip_redraw = TRUE; /* skip redraw once */ do_redraw = FALSE; + #ifdef FEAT_TERMINAL + skip_term_loop = TRUE; + #endif } /* *************** *** 2827,2832 **** --- 2830,2838 ---- /* Since got_int is set all typeahead will be flushed, but we * want to keep this ':', remember that in a special way. */ typeahead_noflush(':'); + #ifdef FEAT_TERMINAL + skip_term_loop = TRUE; + #endif cmdline_row = Rows - 1; /* put ':' on this line */ skip_redraw = TRUE; /* skip redraw once */ need_wait_return = FALSE; /* don't wait in main() */ *** ../vim-8.1.0081/src/version.c 2018-06-19 17:27:50.085385875 +0200 --- src/version.c 2018-06-19 17:47:54.412556057 +0200 *************** *** 763,764 **** --- 763,766 ---- { /* Add new patch number below this line */ + /**/ + 82, /**/ -- From "know your smileys": :^[/ mean-smiley-with-cigarette /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///