address some PR feedback

This commit is contained in:
Mitchell Hashimoto
2026-03-07 07:04:17 -08:00
parent 259a41d503
commit 038ebef16c
4 changed files with 56 additions and 50 deletions

View File

@@ -30,17 +30,17 @@ final class ScriptSplitCommand: NSScriptCommand {
return nil
}
let baseConfig: Ghostty.SurfaceConfiguration
do {
if let scriptRecord = evaluatedArguments?["configuration"] as? NSDictionary {
let baseConfig: Ghostty.SurfaceConfiguration?
if let scriptRecord = evaluatedArguments?["configuration"] as? NSDictionary {
do {
baseConfig = try Ghostty.SurfaceConfiguration(scriptRecord: scriptRecord)
} else {
baseConfig = Ghostty.SurfaceConfiguration()
} catch {
scriptErrorNumber = errAECoercionFail
scriptErrorString = error.localizedDescription
return nil
}
} catch {
scriptErrorNumber = errAECoercionFail
scriptErrorString = error.localizedDescription
return nil
} else {
baseConfig = nil
}
// Find the window controller that owns this surface.