mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-07-28 03:26:28 +00:00
apprt/gtk-ng: surface close in split tree
This commit is contained in:
@@ -119,6 +119,9 @@ pub fn SplitTree(comptime V: type) type {
|
||||
|
||||
/// Clone this tree, returning a new tree with the same nodes.
|
||||
pub fn clone(self: *const Self, gpa: Allocator) Allocator.Error!Self {
|
||||
// If we're empty then return an empty tree.
|
||||
if (self.isEmpty()) return .empty;
|
||||
|
||||
// Create a new arena allocator for the clone.
|
||||
var arena = ArenaAllocator.init(gpa);
|
||||
errdefer arena.deinit();
|
||||
|
||||
Reference in New Issue
Block a user