Skip to content

Commit 80ee2cc

Browse files
committed
Show Window
1 parent 833fa49 commit 80ee2cc

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

CodeEdit/Features/Documents/Controllers/CodeEditDocumentController.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ final class CodeEditDocumentController: NSDocumentController {
8080
/// - Parameter url: The file URL to open.
8181
/// - Returns: True, if the document was opened in a workspace.
8282
private func openFileInExistingWorkspace(url: URL) -> Bool {
83-
guard url.isFileURL else { return false }
83+
guard !url.isFolder else { return false }
8484
let workspaces = documents.compactMap({ $0 as? WorkspaceDocument })
8585

8686
// Check open workspaces for the file being opened. Sorted by shared components with the url so we
@@ -91,6 +91,7 @@ final class CodeEditDocumentController: NSDocumentController {
9191
// createIfNotFound will still return `nil` if the files don't share a common ancestor.
9292
if let newFile = workspace.workspaceFileManager?.getFile(url.absolutePath, createIfNotFound: true) {
9393
workspace.editorManager?.openTab(item: newFile)
94+
workspace.showWindows()
9495
return true
9596
}
9697
}

0 commit comments

Comments
 (0)