terminal: hyperlink capacity adjustment needs to call safe variant

This commit is contained in:
Mitchell Hashimoto
2024-07-06 08:47:22 -07:00
parent d79bbaac68
commit 4a861a8c8f

View File

@ -1549,14 +1549,11 @@ pub fn cursorSetHyperlink(self: *Screen) !void {
} else |err| switch (err) {
// hyperlink_map is out of space, realloc the page to be larger
error.OutOfMemory => {
_ = try self.pages.adjustCapacity(
_ = try self.adjustCapacity(
self.cursor.page_pin.page,
.{ .hyperlink_bytes = page.capacity.hyperlink_bytes * 2 },
);
// Reload cursor since our cursor page has changed.
self.cursorReload();
// Retry
return try self.cursorSetHyperlink();
},