16 Commits

Author SHA1 Message Date
Mitchell Hashimoto
18dfb642f5 macos: plumb through the split divider color 2024-01-29 21:32:10 -08:00
Ryota
ad9de6707d Fix comment 2024-01-12 00:54:16 +00:00
Ryota
3baae1dce8 Wrap around split focus with next and previous 2024-01-12 00:53:47 +00:00
Mitchell Hashimoto
d482fed7f2 simplify some swift 2023-11-07 15:26:41 -08:00
Gregory Anders
cd01340cce macos: add key binding for equalizing split sizes 2023-11-07 16:23:28 -06:00
Gregory Anders
dc7c313166 macos: pass split as a binding to SplitView
Fixes: https://github.com/mitchellh/ghostty/issues/833
2023-11-07 11:55:29 -06:00
Mitchell Hashimoto
bc0d1a9255 macos: remove focused cell size resize increment setter 2023-11-06 09:11:50 -08:00
Mitchell Hashimoto
1ff0573518 macos: use normal swiftui parameters for resizable publisher/inc 2023-11-06 09:06:20 -08:00
Gregory Anders
9b14398153 macos: support resizing splits 2023-11-05 20:42:59 -06:00
Gregory Anders
3b2799ce97 macos: refactor SplitNode
This commit does two things: adds a weak reference to the parent
container of each SplitNode.Container and SplitNode.Leaf and moves the
"direction" of a split out of the SplitNode enum and into the
SplitNode.Container struct as a field.

Both changes are required for supporting split resizing. A reference to
the parent in each leaf and split container is needed in order to
traverse upwards through the split tree. If the focused split is not
part of a container that is split along the direction that was requested
to be resized, then we instead try and resize the parent. If the parent
is split along the requested direction, then it is resized
appropriately; otherwise, repeat until the root of the tree is reached.

The direction is needed inside the SplitNode.Container object itself so
that the container knows whether or not it is able to resize itself in
the direction requested by the user. Once the split direction was moved
inside of SplitNode.Container, it became redundant to also have it as
part of the SplitNode enum, so this simplifies things.
2023-11-05 20:20:39 -06:00
Gregory Anders
f614d45e28 macos: set id on nested terminal splits
This fixes https://github.com/mitchellh/ghostty/issues/761 for terminal
splits that are not at the root.
2023-11-05 19:37:20 -06:00
Mitchell Hashimoto
ae104111d7 macos: fix some split focus issues 2023-10-30 22:48:35 -07:00
Mitchell Hashimoto
3cb0846d8c macos: regressed #761 2023-10-30 19:25:02 -07:00
Mitchell Hashimoto
c18cf207d6 macos: rename all the 2-suffix 2023-10-30 14:40:45 -07:00
Mitchell Hashimoto
f6d98ae40f macos: delete Ghostty.SplitView 2023-10-30 14:39:26 -07:00
Mitchell Hashimoto
c86faa37c2 macos: terminal controller owns split data 2023-10-30 14:31:04 -07:00