diff options
-rw-r--r-- | runtime/doc/change.txt | 3 | ||||
-rw-r--r-- | runtime/doc/visual.txt | 4 | ||||
-rw-r--r-- | src/normal.c | 2 | ||||
-rw-r--r-- | src/testdir/test_visual.vim | 14 | ||||
-rw-r--r-- | src/version.c | 2 |
5 files changed, 22 insertions, 3 deletions
diff --git a/runtime/doc/change.txt b/runtime/doc/change.txt index a00049bef3..65da9a7c6b 100644 --- a/runtime/doc/change.txt +++ b/runtime/doc/change.txt @@ -1,4 +1,4 @@ -*change.txt* For Vim version 9.0. Last change: 2023 Mar 07 +*change.txt* For Vim version 9.0. Last change: 2023 Sep 19 VIM REFERENCE MANUAL by Bram Moolenaar @@ -210,6 +210,7 @@ gR Enter Virtual Replace mode: Each character you type *v_r* {Visual}r{char} Replace all selected characters by {char}. + CTRL-C will be inserted literally. *v_C* {Visual}["x]C Delete the highlighted lines [into register x] and diff --git a/runtime/doc/visual.txt b/runtime/doc/visual.txt index 540d5c574f..616e773fe3 100644 --- a/runtime/doc/visual.txt +++ b/runtime/doc/visual.txt @@ -1,4 +1,4 @@ -*visual.txt* For Vim version 9.0. Last change: 2022 Dec 04 +*visual.txt* For Vim version 9.0. Last change: 2023 Sep 19 VIM REFERENCE MANUAL by Bram Moolenaar @@ -183,6 +183,8 @@ If you want to highlight exactly the same area as the last time, you can use CTRL-C In Visual mode: Stop Visual mode. When insert mode is pending (the mode message shows "-- (insert) VISUAL --"), it is also stopped. + On MS-Windows, you may need to press CTRL-Break + |dos-CTRL-Break|. ============================================================================== 3. Changing the Visual area *visual-change* diff --git a/src/normal.c b/src/normal.c index 86b8740f8a..9f203b8587 100644 --- a/src/normal.c +++ b/src/normal.c @@ -4799,7 +4799,7 @@ nv_replace(cmdarg_T *cap) if (VIsual_active) { if (got_int) - reset_VIsual(); + got_int = FALSE; if (had_ctrl_v) { // Use a special (negative) number to make a difference between a diff --git a/src/testdir/test_visual.vim b/src/testdir/test_visual.vim index 58b7392947..290641e1df 100644 --- a/src/testdir/test_visual.vim +++ b/src/testdir/test_visual.vim @@ -1573,4 +1573,18 @@ func Test_visual_hl_with_showbreak() call StopVimInTerminal(buf) endfunc +func Test_Visual_r_CTRL_C() + new + " visual r_cmd + call setline(1, [' ']) + call feedkeys("\<c-v>$r\<c-c>", 'tx') + call assert_equal([''], getline(1, 1)) + + " visual gr_cmd + call setline(1, [' ']) + call feedkeys("\<c-v>$gr\<c-c>", 'tx') + call assert_equal([''], getline(1, 1)) + bw! +endfu + " vim: shiftwidth=2 sts=2 expandtab diff --git a/src/version.c b/src/version.c index 809fb60811..03cb97fd05 100644 --- a/src/version.c +++ b/src/version.c @@ -700,6 +700,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1915, +/**/ 1914, /**/ 1913, |