From b8a482ebf8e59aa1072475b74d98efb848f98dea Mon Sep 17 00:00:00 2001 From: Bjorn Winckler Date: Thu, 31 Jan 2008 19:45:22 +0100 Subject: [PATCH] Always detect ^C Sometimes Ctrl-keys are sent to the backend as text instead of as a command key, so we must look for ^C in both cases. This fixes a the ^W^C bug (Issue 48). --- src/MacVim/MMBackend.m | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/MacVim/MMBackend.m b/src/MacVim/MMBackend.m index 598272ab94..8b8f30f836 100644 --- a/src/MacVim/MMBackend.m +++ b/src/MacVim/MMBackend.m @@ -1662,6 +1662,12 @@ static NSString *MMSymlinkWarningString = } #endif + if (len == 1 && ((str[0] == Ctrl_C && ctrl_c_interrupts) + || (str[0] == intr_char && intr_char != Ctrl_C))) { + trash_input_buf(); + got_int = TRUE; + } + for (i = 0; i < len; ++i) { add_to_input_buf(str+i, 1); if (CSI == str[i]) {