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
private var title: String {
var title = "👻"
if let surfaceTitle = surfaceTitle {
if (surfaceTitle.count > 0) {
title = surfaceTitle
}
if let surfaceTitle = surfaceTitle, !surfaceTitle.isEmpty {
return surfaceTitle
}
return title
return "👻"
}
// 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
// changed with escape codes. This is public because the callbacks go
// 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
// changed with escape codes.