Reduce ghost emoji flash in title bar

This commit is contained in:
Bryan Lee
2025-01-08 14:19:55 +08:00
parent eb40cce45e
commit 0651586339
2 changed files with 6 additions and 11 deletions

View File

@ -56,15 +56,10 @@ struct TerminalView<ViewModel: TerminalViewModel>: View {
// The title for our window // The title for our window
private var title: String { private var title: String {
var title = "👻" if let surfaceTitle = surfaceTitle, !surfaceTitle.isEmpty {
return surfaceTitle
if let surfaceTitle = surfaceTitle {
if (surfaceTitle.count > 0) {
title = surfaceTitle
}
} }
return "👻"
return title
} }
// The pwd of the focused surface as a URL // The pwd of the focused surface as a URL

View File

@ -12,7 +12,7 @@ extension Ghostty {
// The current title of the surface as defined by the pty. This can be // The current title of the surface as defined by the pty. This can be
// changed with escape codes. This is public because the callbacks go // changed with escape codes. This is public because the callbacks go
// to the app level and it is set from there. // to the app level and it is set from there.
@Published private(set) var title: String = "👻" @Published private(set) var title: String = ""
// The current pwd of the surface as defined by the pty. This can be // The current pwd of the surface as defined by the pty. This can be
// changed with escape codes. // changed with escape codes.