Skip to content

Commit

Permalink
Remove code causing a malloc exception, See CodeEditApp#1886
Browse files Browse the repository at this point in the history
  • Loading branch information
thecoolwinter committed Sep 17, 2024
1 parent f7e0253 commit 3af0370
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions CodeEdit/Features/Editor/Views/EditorAreaView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,12 @@ struct EditorAreaView: View {
.background(EffectView(.headerView))
}
.focused($focus, equals: editor)
.onReceive(NotificationCenter.default.publisher(for: TextView.textDidChangeNotification)) { _ in
if navigationStyle == .openInTabs {
editor.temporaryTab = nil
}
}
// Fixing this is causing a malloc exception when a file is edited & closed. See #1886
// .onReceive(NotificationCenter.default.publisher(for: TextView.textDidChangeNotification)) { _ in
// if navigationStyle == .openInTabs {
// editor.temporaryTab = nil
// }
// }
.onChange(of: navigationStyle) { newValue in
if newValue == .openInPlace && editor.tabs.count == 1 {
editor.temporaryTab = editor.tabs[0]
Expand Down

0 comments on commit 3af0370

Please sign in to comment.