mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-09-28 05:58:36 +00:00
macos: address some feedback
This commit is contained in:
@@ -132,8 +132,8 @@ struct TerminalQuery: EntityStringQuery, EnumerableEntityQuery {
|
||||
}
|
||||
|
||||
// Get all our surfaces
|
||||
return controllers.reduce([]) { result, c in
|
||||
result + (c.surfaceTree.root?.leaves() ?? [])
|
||||
return controllers.flatMap {
|
||||
$0.surfaceTree.root?.leaves() ?? []
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -5,9 +5,9 @@ enum GhosttyIntentError: Error, CustomLocalizedStringResourceConvertible {
|
||||
|
||||
var localizedStringResource: LocalizedStringResource {
|
||||
switch self {
|
||||
case .appUnavailable: return "The Ghostty app isn't properly initialized."
|
||||
case .surfaceNotFound: return "The terminal no longer exists."
|
||||
case .permissionDenied: return "Ghostty doesn't allow Shortcuts."
|
||||
case .appUnavailable: "The Ghostty app isn't properly initialized."
|
||||
case .surfaceNotFound: "The terminal no longer exists."
|
||||
case .permissionDenied: "Ghostty doesn't allow Shortcuts."
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -34,14 +34,14 @@ extension Array where Element == String {
|
||||
func helper(index: Int, accumulated: [UnsafePointer<Int8>?], body: ([UnsafePointer<Int8>?]) throws -> T) rethrows -> T {
|
||||
if index == count {
|
||||
return try body(accumulated)
|
||||
} else {
|
||||
}
|
||||
|
||||
return try self[index].withCString { cStr in
|
||||
var newAccumulated = accumulated
|
||||
newAccumulated.append(cStr)
|
||||
return try helper(index: index + 1, accumulated: newAccumulated, body: body)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return try helper(index: 0, accumulated: [], body: body)
|
||||
}
|
||||
|
Reference in New Issue
Block a user