Skip to content

Commit

Permalink
Avoid exception in key handling routine
Browse files Browse the repository at this point in the history
  • Loading branch information
b4winckler committed Jan 30, 2009
1 parent 87694dc commit 8502d5f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/MacVim/MMTextViewHelper.m
Expand Up @@ -747,7 +747,7 @@ - (void)dispatchKeyEvent:(NSEvent *)event
NSString *chars = [event characters];
NSString *unmodchars = [event charactersIgnoringModifiers];
unichar c = [chars characterAtIndex:0];
unichar imc = [unmodchars characterAtIndex:0];
unichar imc = [unmodchars length] > 0 ? [unmodchars characterAtIndex:0] : 0;
int len = 0;
const char *bytes = 0;
int mods = [event modifierFlags];
Expand Down

0 comments on commit 8502d5f

Please sign in to comment.