Move title change timer to SurfaceView and call it from Ghostty.App instead of terminal controllers

This commit is contained in:
Pranav Mangal
2024-12-12 14:58:42 +05:30
parent 146b1f2a1b
commit e35bd431f4
4 changed files with 20 additions and 25 deletions

View File

@@ -13,6 +13,10 @@ extension Ghostty {
// changed with escape codes. This is public because the callbacks go
// to the app level and it is set from there.
@Published var title: String = "👻"
// A small delay that is introduced before a title change to avoid flickers
var titleChangeDelay: TimeInterval = 0.075
var titleChangeTimer: Timer?
// The current pwd of the surface as defined by the pty. This can be
// changed with escape codes.