aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPBundleEditorController.m
diff options
context:
space:
mode:
Diffstat (limited to 'Source/SPBundleEditorController.m')
-rw-r--r--Source/SPBundleEditorController.m17
1 files changed, 17 insertions, 0 deletions
diff --git a/Source/SPBundleEditorController.m b/Source/SPBundleEditorController.m
index 4f415416..823feae8 100644
--- a/Source/SPBundleEditorController.m
+++ b/Source/SPBundleEditorController.m
@@ -1138,6 +1138,23 @@
#pragma mark -
#pragma mark TableView delegate
+/**
+ * Traps enter and esc and edit/cancel without entering next row
+ */
+- (BOOL)control:(NSControl *)control textView:(NSTextView *)textView doCommandBySelector:(SEL)command
+{
+ if ( [[control window] methodForSelector:command] == [[control window] methodForSelector:@selector(_cancelKey:)] ||
+ [textView methodForSelector:command] == [textView methodForSelector:@selector(complete:)] ) {
+
+ //abort editing
+ [control abortEditing];
+ [[NSApp mainWindow] makeFirstResponder:commandsOutlineView];
+ return TRUE;
+ } else{
+ return FALSE;
+ }
+}
+
- (void)controlTextDidEndEditing:(NSNotification *)aNotification
{