Shift-tab no longer treated as Ctrl-Y (fixes Ctrl-Y bug)

git-svn-id: http://macvim.googlecode.com/svn/trunk@136 96c4425d-ca35-0410-94e5-3396d5c13a8f
This commit is contained in:
Bjorn Winckler
2007-08-14 16:42:10 +00:00
parent 9487df63bf
commit d0aa271e7a
2 changed files with 9 additions and 4 deletions
+8 -3
View File
@@ -428,8 +428,6 @@
if ([event type] != NSKeyDown)
return;
//NSLog(@"%s%@", _cmd, event);
NSString *chars = [event characters];
NSString *imchars = [event charactersIgnoringModifiers];
unichar c = [chars characterAtIndex:0];
@@ -437,6 +435,8 @@
int len = 0;
const char *bytes = 0;
//NSLog(@"%s chars=0x%x unmodchars=0x%x", _cmd, c, imc);
if (' ' == imc && 0xa0 != c) {
// HACK! The AppKit turns <C-Space> into <C-@> which is not standard
// Vim behaviour, so bypass this problem. (0xa0 is <M-Space>, which
@@ -451,7 +451,12 @@
// HACK! Translate Ctrl+6 to <C-^>.
static char ctrl_hat = 0x1e;
len = 1; bytes = &ctrl_hat;
} else {
} else if (c == 0x19 && imc == 0x19) {
// HACK! AppKit turns back tab into Ctrl-Y, so we need to handle it
// separately (else Ctrl-Y doesn't work).
static char back_tab[2] = { 'k', 'B' };
len = 2; bytes = back_tab;
}else {
len = [chars lengthOfBytesUsingEncoding:NSUTF8StringEncoding];
bytes = [chars UTF8String];
}
+1 -1
View File
@@ -4,7 +4,7 @@
<dict>
<key></key>
<string>KA</string>
<key></key>
<key>kB</key>
<string>kB</string>
<key></key>
<string>kb</string>