Skip to content

Commit

Permalink
Replace Temporary Tab
Browse files Browse the repository at this point in the history
  • Loading branch information
thecoolwinter committed Sep 26, 2024
1 parent 4974fa1 commit 2ca4f19
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions CodeEdit/Features/Editor/Models/Editor+History.swift
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,10 @@ extension Editor {
if let temporaryTab, tabs.contains(temporaryTab) {
closeTab(file: temporaryTab.file, fromHistory: true)
}
let newTab = Tab(file: file)
temporaryTab = newTab
openTab(tab: newTab, fromHistory: true)
openTab(file: file, fromHistory: true)
if let tab = tabs.first(where: { $0.file.id == file.id }) {
temporaryTab = tab
}
}
setSelectedTab(file)
}
Expand Down

0 comments on commit 2ca4f19

Please sign in to comment.