aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPEditSheetTextView.m
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2010-10-29 20:06:44 +0000
committerBibiko <bibiko@eva.mpg.de>2010-10-29 20:06:44 +0000
commite93d9df70e29e53c4588a6d49bf3a056ac56e9db (patch)
tree96b774aaac21f4a81d3a573b109520859f5a908a /Source/SPEditSheetTextView.m
parent79f4bb582755adfdc9504830d3a8bf061e1e49c1 (diff)
downloadsequelpro-e93d9df70e29e53c4588a6d49bf3a056ac56e9db.tar.gz
sequelpro-e93d9df70e29e53c4588a6d49bf3a056ac56e9db.tar.bz2
sequelpro-e93d9df70e29e53c4588a6d49bf3a056ac56e9db.zip
• convert the Field Editor Sheet into a document-modal sheet, i.e. now the sheet doesn't block the entire app
- fixed various layout issues - fixed some tiny memory leaks • fixed tiny memory leak in MCPStreamingResult
Diffstat (limited to 'Source/SPEditSheetTextView.m')
-rw-r--r--Source/SPEditSheetTextView.m13
1 files changed, 10 insertions, 3 deletions
diff --git a/Source/SPEditSheetTextView.m b/Source/SPEditSheetTextView.m
index 0d309f35..e46868b7 100644
--- a/Source/SPEditSheetTextView.m
+++ b/Source/SPEditSheetTextView.m
@@ -64,7 +64,7 @@
[super cut:sender];
}
-/*
+/**
* Validate undo and redo menu items
*/
- (BOOL)validateMenuItem:(NSMenuItem *)menuItem
@@ -99,9 +99,7 @@
return;
}
- // NSString *characters = [theEvent characters];
NSString *charactersIgnMod = [theEvent charactersIgnoringModifiers];
- // unichar insertedCharacter = [characters characterAtIndex:0];
long curFlags = ([theEvent modifierFlags] & allFlags);
if(curFlags & NSCommandKeyMask) {
@@ -119,6 +117,15 @@
}
}
+ // Allow undo grouping if user typed a ' ' (for word level undo)
+ // or a RETURN but not for each char due to writing speed
+ if([charactersIgnMod isEqualToString:@" "]
+ || [theEvent keyCode] == 36
+ || [theEvent modifierFlags] & (NSCommandKeyMask|NSControlKeyMask|NSAlternateKeyMask)
+ ) {
+ [[self delegate] setDoGroupDueToChars];
+ }
+
[super keyDown: theEvent];
}