mirror of
https://github.com/macvim-dev/macvim.git
synced 2026-06-11 15:37:29 +02:00
Marked text field is hidden whenever window loses focus
git-svn-id: http://macvim.googlecode.com/svn/trunk@212 96c4425d-ca35-0410-94e5-3396d5c13a8f
This commit is contained in:
@@ -32,5 +32,6 @@
|
||||
- (void)setShouldDrawInsertionPoint:(BOOL)on;
|
||||
- (void)drawInsertionPointAtRow:(int)row column:(int)col shape:(int)shape
|
||||
fraction:(int)percent color:(NSColor *)color;
|
||||
- (void)hideMarkedTextField;
|
||||
|
||||
@end
|
||||
|
||||
+9
-10
@@ -34,7 +34,6 @@ static float MMDragAreaSize = 73.0f;
|
||||
- (MMVimController *)vimController;
|
||||
- (void)startDragTimerWithInterval:(NSTimeInterval)t;
|
||||
- (void)dragTimerFired:(NSTimer *)timer;
|
||||
- (void)hideMarkedTextField;
|
||||
- (void)sendKeyDown:(const char *)chars length:(int)len modifiers:(int)flags;
|
||||
@end
|
||||
|
||||
@@ -90,6 +89,15 @@ static float MMDragAreaSize = 73.0f;
|
||||
[self setInsertionPointColor:color];
|
||||
}
|
||||
|
||||
- (void)hideMarkedTextField
|
||||
{
|
||||
if (markedTextField) {
|
||||
NSWindow *win = [markedTextField window];
|
||||
[win close];
|
||||
[markedTextField setStringValue:@""];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)drawRect:(NSRect)rect
|
||||
{
|
||||
[super drawRect:rect];
|
||||
@@ -883,15 +891,6 @@ static float MMDragAreaSize = 73.0f;
|
||||
++tick;
|
||||
}
|
||||
|
||||
- (void)hideMarkedTextField
|
||||
{
|
||||
if (markedTextField) {
|
||||
NSWindow *win = [markedTextField window];
|
||||
[win close];
|
||||
[markedTextField setStringValue:@""];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)sendKeyDown:(const char *)chars length:(int)len modifiers:(int)flags
|
||||
{
|
||||
if (chars && len > 0) {
|
||||
|
||||
@@ -627,6 +627,9 @@ NSMutableArray *buildMenuAddress(NSMenu *menu)
|
||||
- (void)windowDidResignMain:(NSNotification *)notification
|
||||
{
|
||||
[vimController sendMessage:LostFocusMsgID data:nil wait:NO];
|
||||
|
||||
if (textView)
|
||||
[textView hideMarkedTextField];
|
||||
}
|
||||
|
||||
- (BOOL)windowShouldClose:(id)sender
|
||||
|
||||
Reference in New Issue
Block a user