Skip to content

Commit

Permalink
Fix Ctrl key regression
Browse files Browse the repository at this point in the history
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 a8da347
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
8 changes: 4 additions & 4 deletions src/MacVim/KeyBinding.plist
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -370,7 +370,7 @@
<string>moveToBeginningOfLineAndModifySelection:</string>
<key>^$</key>
<string>moveToEndOfLineAndModifySelection:</string>
<key>~</key>
<!-- <key>~</key>
<array>
<string>moveBackward:</string>
<string>moveToBeginningOfParagraph:</string>
Expand All @@ -379,7 +379,7 @@
<array>
<string>moveForward:</string>
<string>moveToEndOfParagraph:</string>
</array>
</array> -->
<key>~</key>
<string>moveWordLeft:</string>
<key>~</key>
Expand Down
3 changes: 2 additions & 1 deletion src/MacVim/MMBackend.m
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
8 changes: 4 additions & 4 deletions src/MacVim/MMTextViewHelper.m
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit a8da347

Please sign in to comment.