Permalink
Browse files

Fix Ctrl key regression

Fix Ctrl-h, Ctrl-@ and Ctrl-o regression.  Also remove all key bindings
involving arrays from KeyBinding.dict.
  • Loading branch information...
b4winckler committed Aug 15, 2009
1 parent 2e45751 commit a8da347a13fa1a20ba8f367e1d6c76a8aec9f586
Showing with 10 additions and 9 deletions.
  1. +4 −4 src/MacVim/KeyBinding.plist
  2. +2 −1 src/MacVim/MMBackend.m
  3. +4 −4 src/MacVim/MMTextViewHelper.m
@@ -150,11 +150,11 @@
<string>centerSelectionInVisibleArea:</string>
<key>^n</key>
<string>moveDown:</string>
- <key>^o</key>
+ <!-- <key>^o</key>
<array>
<string>insertNewlineIgnoringFieldEditor:</string>
<string>moveBackward:</string>
- </array>
+ </array> -->
<key>^p</key>
<string>moveUp:</string>
<key>^t</key>
@@ -370,7 +370,7 @@
<string>moveToBeginningOfLineAndModifySelection:</string>
<key>^$</key>
<string>moveToEndOfLineAndModifySelection:</string>
- <key>~</key>
+ <!-- <key>~</key>
<array>
<string>moveBackward:</string>
<string>moveToBeginningOfParagraph:</string>
@@ -379,7 +379,7 @@
<array>
<string>moveForward:</string>
<string>moveToEndOfParagraph:</string>
- </array>
+ </array> -->
<key>~</key>
<string>moveWordLeft:</string>
<key>~</key>
View
@@ -1135,7 +1135,8 @@ - (oneway void)processInput:(int)msgid data:(in bycopy NSData *)data
if (1 == len) {
char_u *str = (char_u*)bytes;
if ((str[0] == Ctrl_C && ctrl_c_interrupts) ||
- (str[0] == intr_char && intr_char != Ctrl_C)) {
+ (str[0] == intr_char && intr_char != 0)) {
+ ASLogDebug(@"Got INT, str[0]=%#x", str[0]);
got_int = TRUE;
[inputQueue removeAllObjects];
return;
@@ -251,7 +251,7 @@ - (void)doCommandBySelector:(SEL)sel
@selector(deleteWordBackward:) == sel ||
@selector(deleteBackwardByDecomposingPreviousCharacter:) == sel ||
@selector(deleteToBeginningOfLine:) == sel)
- [self doKeyDown:@"\x7f"];
+ [self doKeyDown:@"\x08"];
else if (@selector(keySpace:) == sel)
[self doKeyDown:@" "];
else if (@selector(cancel:) == sel)
@@ -262,6 +262,8 @@ - (void)doCommandBySelector:(SEL)sel
- (BOOL)performKeyEquivalent:(NSEvent *)event
{
ASLogDebug(@"");
+ if ([event type] != NSKeyDown)
+ return NO;
// NOTE: Key equivalent handling was fixed in Leopard. That is, an
// unhandled key equivalent is passed to keyDown: -- contrast this with
@@ -294,9 +296,7 @@ - (BOOL)performKeyEquivalent:(NSEvent *)event
// HACK! Pass the event on or it may disappear (Tiger does not pass Cmd-key
// events to keyDown:).
- if ([event type] == NSKeyDown)
- [self keyDown:event];
-
+ [self keyDown:event];
return YES;
}

0 comments on commit a8da347

Please sign in to comment.