mirror of
https://github.com/macvim-dev/macvim.git
synced 2026-06-07 15:37:14 +02:00
The font panel is updated when the font changes.
git-svn-id: http://macvim.googlecode.com/svn/trunk@200 96c4425d-ca35-0410-94e5-3396d5c13a8f
This commit is contained in:
+21
-16
@@ -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
|
||||
|
||||
@@ -452,6 +452,7 @@ NSMutableArray *buildMenuAddress(NSMenu *menu)
|
||||
|
||||
- (void)setFont:(NSFont *)font
|
||||
{
|
||||
[[NSFontManager sharedFontManager] setSelectedFont:font isMultiple:NO];
|
||||
[textStorage setFont:font];
|
||||
[self updateResizeIncrements];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user