diff --git a/ChangeLog b/ChangeLog index 620234d..0855503 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2021-02-03 Riccardo Mottola + + * Framework/PCEditorManager.m: + Do not open an external editor if an in-window is requested. + 2020-09-08 Riccardo Mottola * Modules/Editors/ProjectCenter/SyntaxHighlighter.h diff --git a/Framework/PCEditorManager.m b/Framework/PCEditorManager.m index 0d4ca05..53fabb8 100644 --- a/Framework/PCEditorManager.m +++ b/Framework/PCEditorManager.m @@ -170,7 +170,7 @@ NSString *PCEditorDidResignActiveNotification = id parser; BOOL exists = [fm fileExistsAtPath:filePath isDirectory:&isDir]; - // Determine if file not exist or file is directory + // Determine if file does not exist or file is directory if (!exists) { NSRunAlertPanel(@"Open Editor", @@ -198,10 +198,14 @@ NSString *PCEditorDidResignActiveNotification = else { NSString *app; + + /* we don't have in-window editors for any bundles right now */ + if (!windowed) + return; - /* Check for bundles and if possible let them be opened by Workspace */ + /* Check for bundles and if possible let them be opened by Workspace but only if windowed */ app = [[NSWorkspace sharedWorkspace] getBestAppInRole:@"Editor" forExtension:[fileName pathExtension]]; - if (app) + if (windowed && app != nil) { if ([[NSWorkspace sharedWorkspace] openFile: filePath]) return nil;