aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/SPBundleEditorController.m17
-rw-r--r--Source/SPBundleHTMLOutputController.m1
2 files changed, 18 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
{
diff --git a/Source/SPBundleHTMLOutputController.m b/Source/SPBundleHTMLOutputController.m
index 3f6d4046..5d3d0ddf 100644
--- a/Source/SPBundleHTMLOutputController.m
+++ b/Source/SPBundleHTMLOutputController.m
@@ -167,6 +167,7 @@
- (void)windowShouldClose:(NSNotification *)notification
{
[webView close];
+ windowUUID = @"";
}
#pragma mark -