aboutsummaryrefslogtreecommitdiff
path: root/vendor/libghostty-vt/src/datastruct/split_tree.zig
diff options
context:
space:
mode:
authorCan Celik <ogulcancelik@gmail.com>2026-09-10 21:51:57 +0300
committerGitHub <noreply@github.com>2026-09-10 21:51:57 +0300
commit425c86179791cd32e2d4ce0ae7f269940b4b0663 (patch)
treee52c4383a6d69216cbe2a32638bf90841d7e2189 /vendor/libghostty-vt/src/datastruct/split_tree.zig
parent90e947a6e26e02f10ec7f1694c4eb5b78a86406b (diff)
chore: upgrade libghostty and preserve terminal behavior (#3906)
Diffstat (limited to 'vendor/libghostty-vt/src/datastruct/split_tree.zig')
-rw-r--r--vendor/libghostty-vt/src/datastruct/split_tree.zig12
1 files changed, 12 insertions, 0 deletions
diff --git a/vendor/libghostty-vt/src/datastruct/split_tree.zig b/vendor/libghostty-vt/src/datastruct/split_tree.zig
index 1dc924ca..012f107f 100644
--- a/vendor/libghostty-vt/src/datastruct/split_tree.zig
+++ b/vendor/libghostty-vt/src/datastruct/split_tree.zig
@@ -183,6 +183,18 @@ pub fn SplitTree(comptime V: type) type {
};
}
+ /// Find the handle within this tree that corresponds
+ /// to the given view. Uses pointer equality.
+ pub fn locate(self: *const Self, view: *const View) ?Node.Handle {
+ var it = self.iterator();
+ while (it.next()) |entry| {
+ if (entry.view == view) {
+ return entry.handle;
+ }
+ }
+ return null;
+ }
+
/// An iterator over all the views in the tree.
pub fn iterator(
self: *const Self,