To: vim_dev@googlegroups.com Subject: Patch 8.2.3466 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.3466 Problem: Completion submode not indicated for virtual replace. Solution: Add submode to "Rv". (closes #8945) Files: runtime/doc/eval.txt, src/misc1.c, src/testdir/test_functions.vim *** ../vim-8.2.3465/runtime/doc/eval.txt 2021-10-03 12:01:23.533541368 +0100 --- runtime/doc/eval.txt 2021-10-03 15:17:57.187986541 +0100 *************** *** 8000,8021 **** niV Normal using |i_CTRL-O| in |Virtual-Replace-mode| nt Terminal-Normal (insert goes to Terminal-Job mode) v Visual by character V Visual by line CTRL-V Visual blockwise s Select by character S Select by line CTRL-S Select blockwise - vs Visual by character using |v_CTRL-O| from - Select mode - Vs Visual by line using |v_CTRL-O| from Select mode - CTRL-Vs Visual blockwise using |v_CTRL-O| from Select mode i Insert ic Insert mode completion |compl-generic| ix Insert mode |i_CTRL-X| completion R Replace |R| Rc Replace mode completion |compl-generic| - Rv Virtual Replace |gR| Rx Replace mode |i_CTRL-X| completion c Command-line editing cv Vim Ex mode |gQ| ce Normal Ex mode |Q| --- 8074,8096 ---- niV Normal using |i_CTRL-O| in |Virtual-Replace-mode| nt Terminal-Normal (insert goes to Terminal-Job mode) v Visual by character + vs Visual by character using |v_CTRL-O| in Select mode V Visual by line + Vs Visual by line using |v_CTRL-O| in Select mode CTRL-V Visual blockwise + CTRL-Vs Visual blockwise using |v_CTRL-O| in Select mode s Select by character S Select by line CTRL-S Select blockwise i Insert ic Insert mode completion |compl-generic| ix Insert mode |i_CTRL-X| completion R Replace |R| Rc Replace mode completion |compl-generic| Rx Replace mode |i_CTRL-X| completion + Rv Virtual Replace |gR| + Rvc Virtual Replace mode completion |compl-generic| + Rvx Virtual Replace mode |i_CTRL-X| completion c Command-line editing cv Vim Ex mode |gQ| ce Normal Ex mode |Q| *************** *** 8024,8029 **** --- 8099,8105 ---- r? A |:confirm| query of some sort ! Shell or external command is executing t Terminal-Job mode: keys go to the job + This is useful in the 'statusline' option or when used with |remote_expr()| In most other places it always returns "c" or "n". *** ../vim-8.2.3465/src/misc1.c 2021-10-02 16:55:36.033615848 +0100 --- src/misc1.c 2021-10-03 15:15:02.359773974 +0100 *************** *** 675,680 **** --- 675,685 ---- { buf[0] = 'R'; buf[1] = 'v'; + + if (ins_compl_active()) + buf[2] = 'c'; + else if (ctrl_x_mode_not_defined_yet()) + buf[2] = 'x'; } else { *************** *** 682,687 **** --- 687,693 ---- buf[0] = 'R'; else buf[0] = 'i'; + if (ins_compl_active()) buf[1] = 'c'; else if (ctrl_x_mode_not_defined_yet()) *** ../vim-8.2.3465/src/testdir/test_functions.vim 2021-10-02 16:34:51.114830494 +0100 --- src/testdir/test_functions.vim 2021-10-03 15:15:02.359773974 +0100 *************** *** 785,790 **** --- 785,792 ---- exe "normal iabc\\\\u" call assert_equal('i-ic', g:current_modes) + exe "normal R\\" + call assert_equal('R-R', g:current_modes) " R_CTRL-P: Multiple matches exe "normal RBa\\\u" call assert_equal('R-Rc', g:current_modes) *************** *** 819,824 **** --- 821,862 ---- exe "normal Rabc\\\\u" call assert_equal('R-Rc', g:current_modes) + exe "normal gR\\" + call assert_equal('R-Rv', g:current_modes) + " gR_CTRL-P: Multiple matches + exe "normal gRBa\\\u" + call assert_equal('R-Rvc', g:current_modes) + " gR_CTRL-P: Single match + exe "normal gRBro\\\u" + call assert_equal('R-Rvc', g:current_modes) + " gR_CTRL-X + exe "normal gRBa\\\u" + call assert_equal('R-Rvx', g:current_modes) + " gR_CTRL-X CTRL-P: Multiple matches + exe "normal gRBa\\\\u" + call assert_equal('R-Rvc', g:current_modes) + " gR_CTRL-X CTRL-P: Single match + exe "normal gRBro\\\\u" + call assert_equal('R-Rvc', g:current_modes) + " gR_CTRL-X CTRL-P + CTRL-P: Single match + exe "normal gRBro\\\\\u" + call assert_equal('R-Rvc', g:current_modes) + " gR_CTRL-X CTRL-L: Multiple matches + exe "normal gR\\\\u" + call assert_equal('R-Rvc', g:current_modes) + " gR_CTRL-X CTRL-L: Single match + exe "normal gRBlu\\\\u" + call assert_equal('R-Rvc', g:current_modes) + " gR_CTRL-P: No match + exe "normal gRCom\\\u" + call assert_equal('R-Rvc', g:current_modes) + " gR_CTRL-X CTRL-P: No match + exe "normal gRCom\\\\u" + call assert_equal('R-Rvc', g:current_modes) + " gR_CTRL-X CTRL-L: No match + exe "normal gRabc\\\\u" + call assert_equal('R-Rvc', g:current_modes) + call assert_equal('n', 0->mode()) call assert_equal('n', 1->mode()) *** ../vim-8.2.3465/src/version.c 2021-10-03 12:01:23.533541368 +0100 --- src/version.c 2021-10-03 15:16:32.037937406 +0100 *************** *** 759,760 **** --- 759,762 ---- { /* Add new patch number below this line */ + /**/ + 3466, /**/ -- I AM THANKFUL... ...for the taxes that I pay because it means that I am employed. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///