Ctrl-C is intercepted in MacVim and sends SIGINT to Vim process.

git-svn-id: http://macvim.googlecode.com/svn/trunk@149 96c4425d-ca35-0410-94e5-3396d5c13a8f
This commit is contained in:
Bjorn Winckler
2007-08-17 07:22:52 +00:00
parent 980078e79c
commit b3ff443cd4
6 changed files with 24 additions and 15 deletions
+7
View File
@@ -461,6 +461,13 @@
// handle it separately (else Ctrl-C doesn't work).
static char enter[2] = { 'K', 'A' };
len = 2; bytes = enter;
} else if (c == 0x3 && imc == 0x63) {
// HACK! Intercept Ctrl-C and send SIGINT to Vim.
int pid = [[self vimController] pid];
if (pid > 0) {
kill(pid, SIGINT);
return;
}
} else {
len = [chars lengthOfBytesUsingEncoding:NSUTF8StringEncoding];
bytes = [chars UTF8String];