mirror of
https://github.com/macvim-dev/macvim.git
synced 2026-06-07 15:37:14 +02:00
Keypad enter no longer conflicts with Ctrl-C (fixing Ctrl-C bug)
git-svn-id: http://macvim.googlecode.com/svn/trunk@137 96c4425d-ca35-0410-94e5-3396d5c13a8f
This commit is contained in:
@@ -1089,6 +1089,14 @@ static int specialKeyToNSKey(int key);
|
||||
length = [key lengthOfBytesUsingEncoding:NSUTF8StringEncoding];
|
||||
unichar c = [key characterAtIndex:0];
|
||||
|
||||
if ((c == Ctrl_C && ctrl_c_interrupts)
|
||||
|| (c == intr_char && intr_char != Ctrl_C)) {
|
||||
// TODO: The run loop is not touched while Vim is processing, so
|
||||
// effectively it is impossible to interrupt Vim.
|
||||
trash_input_buf();
|
||||
got_int = TRUE;
|
||||
}
|
||||
|
||||
//NSLog(@"non-special: %@ (hex=%x, mods=%d)", key,
|
||||
// [key characterAtIndex:0], mods);
|
||||
|
||||
|
||||
+6
-1
@@ -456,7 +456,12 @@
|
||||
// separately (else Ctrl-Y doesn't work).
|
||||
static char back_tab[2] = { 'k', 'B' };
|
||||
len = 2; bytes = back_tab;
|
||||
}else {
|
||||
} else if (c == 0x3 && imc == 0x3) {
|
||||
// HACK! AppKit turns enter (not return) into Ctrl-C, so we need to
|
||||
// handle it separately (else Ctrl-C doesn't work).
|
||||
static char enter[2] = { 'K', 'A' };
|
||||
len = 2; bytes = enter;
|
||||
} else {
|
||||
len = [chars lengthOfBytesUsingEncoding:NSUTF8StringEncoding];
|
||||
bytes = [chars UTF8String];
|
||||
}
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key></key>
|
||||
<key>KA</key>
|
||||
<string>KA</string>
|
||||
<key>kB</key>
|
||||
<string>kB</string>
|
||||
|
||||
Reference in New Issue
Block a user