mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-08-02 14:57:31 +03:00
Fix broken macOS changes
This commit is contained in:
@ -51,7 +51,7 @@ extension Ghostty {
|
|||||||
/// Returns the view that would prefer receiving focus in this tree. This is always the
|
/// Returns the view that would prefer receiving focus in this tree. This is always the
|
||||||
/// top-left-most view. This is used when creating a split or closing a split to find the
|
/// top-left-most view. This is used when creating a split or closing a split to find the
|
||||||
/// next view to send focus to.
|
/// next view to send focus to.
|
||||||
func preferredFocus(_ direction: SplitFocusDirection = .top) -> SurfaceView {
|
func preferredFocus(_ direction: SplitFocusDirection = .up) -> SurfaceView {
|
||||||
let container: Container
|
let container: Container
|
||||||
switch (self) {
|
switch (self) {
|
||||||
case .leaf(let leaf):
|
case .leaf(let leaf):
|
||||||
@ -431,12 +431,12 @@ extension Ghostty {
|
|||||||
struct Neighbors {
|
struct Neighbors {
|
||||||
var left: SplitNode?
|
var left: SplitNode?
|
||||||
var right: SplitNode?
|
var right: SplitNode?
|
||||||
var top: SplitNode?
|
var up: SplitNode?
|
||||||
var bottom: SplitNode?
|
var down: SplitNode?
|
||||||
|
|
||||||
/// These are the previous/next nodes. It will certainly be one of the above as well
|
/// These are the previous/next nodes. It will certainly be one of the above as well
|
||||||
/// but we keep track of these separately because depending on the split direction
|
/// but we keep track of these separately because depending on the split direction
|
||||||
/// of the containing node, previous may be left OR top (same for next).
|
/// of the containing node, previous may be left OR up (same for next).
|
||||||
var previous: SplitNode?
|
var previous: SplitNode?
|
||||||
var next: SplitNode?
|
var next: SplitNode?
|
||||||
|
|
||||||
@ -448,8 +448,8 @@ extension Ghostty {
|
|||||||
let map: [SplitFocusDirection : KeyPath<Self, SplitNode?>] = [
|
let map: [SplitFocusDirection : KeyPath<Self, SplitNode?>] = [
|
||||||
.previous: \.previous,
|
.previous: \.previous,
|
||||||
.next: \.next,
|
.next: \.next,
|
||||||
.top: \.top,
|
.up: \.up,
|
||||||
.bottom: \.bottom,
|
.down: \.down,
|
||||||
.left: \.left,
|
.left: \.left,
|
||||||
.right: \.right,
|
.right: \.right,
|
||||||
]
|
]
|
||||||
|
@ -308,7 +308,7 @@ extension Ghostty {
|
|||||||
resizeIncrements: .init(width: 1, height: 1),
|
resizeIncrements: .init(width: 1, height: 1),
|
||||||
resizePublisher: container.resizeEvent,
|
resizePublisher: container.resizeEvent,
|
||||||
left: {
|
left: {
|
||||||
let neighborKey: WritableKeyPath<SplitNode.Neighbors, SplitNode?> = container.direction == .horizontal ? \.right : \.bottom
|
let neighborKey: WritableKeyPath<SplitNode.Neighbors, SplitNode?> = container.direction == .horizontal ? \.right : \.down
|
||||||
|
|
||||||
TerminalSplitNested(
|
TerminalSplitNested(
|
||||||
node: closeableTopLeft(),
|
node: closeableTopLeft(),
|
||||||
@ -318,7 +318,7 @@ extension Ghostty {
|
|||||||
])
|
])
|
||||||
)
|
)
|
||||||
}, right: {
|
}, right: {
|
||||||
let neighborKey: WritableKeyPath<SplitNode.Neighbors, SplitNode?> = container.direction == .horizontal ? \.left : \.top
|
let neighborKey: WritableKeyPath<SplitNode.Neighbors, SplitNode?> = container.direction == .horizontal ? \.left : \.up
|
||||||
|
|
||||||
TerminalSplitNested(
|
TerminalSplitNested(
|
||||||
node: closeableBottomRight(),
|
node: closeableBottomRight(),
|
||||||
|
Reference in New Issue
Block a user