mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-08-02 14:57:31 +03:00
Fixed type conversion garbage
This commit is contained in:
@ -238,20 +238,18 @@ class BaseTerminalController: NSWindowController,
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func pwdDidChange(to: URL?){
|
func pwdDidChange(to: URL?) {
|
||||||
|
|
||||||
guard let window else { return }
|
guard let window else { return }
|
||||||
|
|
||||||
// Get the current working directory from the focused surface
|
if ghostty.config.macosTitlebarProxyIcon == .visible {
|
||||||
if ghostty.config.macosTitlebarProxyIcon == .visible, let pwd = focusedSurface?.pwd {
|
// Use the 'to' URL directly
|
||||||
// Set the window's representedURL to the current working directory
|
window.representedURL = to
|
||||||
window.representedURL = URL(fileURLWithPath: pwd)
|
|
||||||
} else {
|
} else {
|
||||||
// If we don't have a pwd, set representedURL to nil
|
|
||||||
window.representedURL = nil
|
window.representedURL = nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
func cellSizeDidChange(to: NSSize) {
|
func cellSizeDidChange(to: NSSize) {
|
||||||
guard ghostty.config.windowStepResize else { return }
|
guard ghostty.config.windowStepResize else { return }
|
||||||
self.window?.contentResizeIncrements = to
|
self.window?.contentResizeIncrements = to
|
||||||
|
@ -71,7 +71,8 @@ struct TerminalView<ViewModel: TerminalViewModel>: View {
|
|||||||
guard let proxyURLString = focusedSurface?.pwd else {
|
guard let proxyURLString = focusedSurface?.pwd else {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
return URL(string: proxyURLString)
|
// Use fileURLWithPath initializer for file paths
|
||||||
|
return URL(fileURLWithPath: proxyURLString)
|
||||||
}
|
}
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
|
Reference in New Issue
Block a user