summaryrefslogtreecommitdiffstats
path: root/src/normal.c
diff options
context:
space:
mode:
authorChristian Brabandt <cb@256bit.org>2023-09-19 20:41:51 +0200
committerChristian Brabandt <cb@256bit.org>2023-09-19 20:45:07 +0200
commit476733f3d06876c7ac105e064108c973a57984d3 (patch)
treeb5da50a60e0150b41d97161f053cd4d0f0f003fc /src/normal.c
parent1db151436541a3e64cdd5e3d9eb3ace1ce1e1ad0 (diff)
patch 9.0.1915: r_CTRL-C works differently in visual modev9.0.1915
Problem: r_CTRL-C works differently in visual mode Solution: Make r_CTRL-C behave consistent in visual mode in terminal and Windows GUI in visual mode, r CTRL-C behaves strange in Unix like environments. It seems to end visual mode, but still is waiting for few more chars, however it never seems to replace it by any characters and eventually just returns back into normal mode. In contrast in Windows GUI mode, r_CTRL-C replaces in the selected area all characters by a literal CTRL-C. Not sure why it behaves like this. It seems in the Windows GUI, got_int is not set and therefore behaves as if any other normal character has been pressed. So remove the special casing of what happens when got_int is set and make it always behave like in Windows GUI mode. Add a test to verify it always behaves like replacing in the selected area each selected character by a literal CTRL-C. closes: #13091 closes: #13112 Signed-off-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'src/normal.c')
-rw-r--r--src/normal.c2
1 files changed, 1 insertions, 1 deletions
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