diff --git a/MMTextView.m b/MMTextView.m index 7ed96f43b9..88ca43146a 100644 --- a/MMTextView.m +++ b/MMTextView.m @@ -129,6 +129,21 @@ static float MMDragAreaSize = 73.0f; } } +- (void)keyDown:(NSEvent *)event +{ + // HACK! If a modifier is held, don't pass the event along to + // interpretKeyEvents: since some keys are bound to multiple commands which + // means doCommandBySelector: is called several times. + // + // TODO: Figure out a way to disable Cocoa key bindings entirely, without + // affecting input management. + + if ([event modifierFlags] & NSControlKeyMask) + [self dispatchKeyEvent:event]; + else + [super keyDown:event]; +} + - (void)insertText:(id)string { // NOTE! This method is called for normal key presses but also for @@ -526,7 +541,12 @@ static float MMDragAreaSize = 73.0f; - (void)resetCursorRects { - // No need to set up cursor rects...Vim is in control of cursor changes. + // No need to set up cursor rects since Vim handles cursor changes. +} + +- (void)updateFontPanel +{ + // The font panel is updated whenever the font is set. } @end // MMTextView @@ -592,21 +612,6 @@ static float MMDragAreaSize = 73.0f; return rect; } -- (void)keyDown:(NSEvent *)event -{ - // HACK! If a modifier is held, don't pass the event along to - // interpretKeyEvents: since some keys are bound to multiple commands which - // means doCommandBySelector: is called several times. - // - // TODO: Figure out a way to disable Cocoa key bindings entirely, without - // affecting input management. - - if ([event modifierFlags] & NSControlKeyMask) - [self dispatchKeyEvent:event]; - else - [super keyDown:event]; -} - - (void)dispatchKeyEvent:(NSEvent *)event { // Only handle the command if it came from a keyDown event diff --git a/MMWindowController.m b/MMWindowController.m index baef30b1db..d4a9b4192e 100644 --- a/MMWindowController.m +++ b/MMWindowController.m @@ -452,6 +452,7 @@ NSMutableArray *buildMenuAddress(NSMenu *menu) - (void)setFont:(NSFont *)font { + [[NSFontManager sharedFontManager] setSelectedFont:font isMultiple:NO]; [textStorage setFont:font]; [self updateResizeIncrements]; }