To: vim_dev@googlegroups.com Subject: Patch 8.1.0064 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.1.0064 Problem: Typing CTRL-W in a prompt buffer shows mode "-- --". Solution: Set restart_edit to 'A' and check for it. Files: src/edit.c, src/window.c, src/screen.c *** ../vim-8.1.0063/src/edit.c 2018-06-16 15:32:34.460024472 +0200 --- src/edit.c 2018-06-17 16:11:15.377294192 +0200 *************** *** 1179,1185 **** // In a prompt window CTRL-W is used for window commands. // Use Shift-CTRL-W to delete a word. stuffcharReadbuff(Ctrl_W); ! restart_edit = 'i'; nomove = TRUE; count = 0; goto doESCkey; --- 1179,1185 ---- // In a prompt window CTRL-W is used for window commands. // Use Shift-CTRL-W to delete a word. stuffcharReadbuff(Ctrl_W); ! restart_edit = 'A'; nomove = TRUE; count = 0; goto doESCkey; *** ../vim-8.1.0063/src/window.c 2018-06-12 16:49:26.366028607 +0200 --- src/window.c 2018-06-17 16:18:31.098815622 +0200 *************** *** 2114,2119 **** --- 2114,2121 ---- // When leaving a prompt window stop Insert mode and perhaps restart // it when entering that window again. win->w_buffer->b_prompt_insert = restart_edit; + if (restart_edit != 0 && mode_displayed) + clear_cmdline = TRUE; /* unshow mode later */ restart_edit = NUL; // When leaving the window (or closing the window) was done from a *** ../vim-8.1.0063/src/screen.c 2018-06-17 14:47:50.657309005 +0200 --- src/screen.c 2018-06-17 16:12:28.936871827 +0200 *************** *** 10263,10269 **** do_mode = ((p_smd && msg_silent == 0) && ((State & INSERT) ! || restart_edit || VIsual_active)); if (do_mode || reg_recording != 0) { --- 10263,10269 ---- do_mode = ((p_smd && msg_silent == 0) && ((State & INSERT) ! || restart_edit != NUL || VIsual_active)); if (do_mode || reg_recording != 0) { *************** *** 10370,10376 **** #endif MSG_PUTS_ATTR(_(" INSERT"), attr); } ! else if (restart_edit == 'I') MSG_PUTS_ATTR(_(" (insert)"), attr); else if (restart_edit == 'R') MSG_PUTS_ATTR(_(" (replace)"), attr); --- 10370,10376 ---- #endif MSG_PUTS_ATTR(_(" INSERT"), attr); } ! else if (restart_edit == 'I' || restart_edit == 'A') MSG_PUTS_ATTR(_(" (insert)"), attr); else if (restart_edit == 'R') MSG_PUTS_ATTR(_(" (replace)"), attr); *** ../vim-8.1.0063/src/version.c 2018-06-17 15:01:00.580427088 +0200 --- src/version.c 2018-06-17 16:23:00.305303242 +0200 *************** *** 763,764 **** --- 763,766 ---- { /* Add new patch number below this line */ + /**/ + 64, /**/ -- I'm trying to be an optimist, but I don't think it'll work. /// 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 ///