Skip to content

Commit 43d4cfd

Browse files
authored
Fix for excessive files in recents list (#1114)
fix for excessive files in recents list Signed-off-by: Wouter01 <wouterhennen@gmail.com>
1 parent 5659ba0 commit 43d4cfd

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

CodeEdit/Features/Documents/Controllers/CodeEditDocumentController.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ final class CodeEditDocumentController: NSDocumentController {
3737
return panel.url
3838
}
3939

40+
override func noteNewRecentDocument(_ document: NSDocument) {
41+
// The super method is run manually when opening new documents.
42+
}
43+
4044
override func openDocument(_ sender: Any?) {
4145
self.openDocument(onCompletion: { document, documentWasAlreadyOpen in
4246
// TODO: handle errors
@@ -55,6 +59,7 @@ final class CodeEditDocumentController: NSDocumentController {
5559
display displayDocument: Bool,
5660
completionHandler: @escaping (NSDocument?, Bool, Error?) -> Void
5761
) {
62+
super.noteNewRecentDocumentURL(url)
5863
super.openDocument(withContentsOf: url, display: displayDocument) { document, documentWasAlreadyOpen, error in
5964

6065
if let document = document {

0 commit comments

Comments
 (0)