fix: route PWD action to correct TabManager per tabId (#2147)
Previously, GHOSTTY_ACTION_PWD used AppDelegate.shared?.tabManager to update the current working directory, which only returns the key window's TabManager. In multi-window scenarios, cwd updates from non-key windows were written to the wrong TabManager, causing panelDirectories to be empty at save time and falling back to $HOME on restore. Fix by using tabManagerFor(tabId:) to precisely route the update to whichever window owns the tab, ensuring all windows persist their working directories correctly. Fixes #2125
This commit is contained in:
parent
ccaebbd112
commit
0978732c93
1 changed files with 1 additions and 1 deletions
|
|
@ -2468,7 +2468,7 @@ class GhosttyApp {
|
|||
let surfaceId = surfaceView.terminalSurface?.id else { return true }
|
||||
let pwd = action.action.pwd.pwd.flatMap { String(cString: $0) } ?? ""
|
||||
DispatchQueue.main.async {
|
||||
AppDelegate.shared?.tabManager?.updateSurfaceDirectory(
|
||||
AppDelegate.shared?.tabManagerFor(tabId: tabId)?.updateSurfaceDirectory(
|
||||
tabId: tabId,
|
||||
surfaceId: surfaceId,
|
||||
directory: pwd
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue