mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-04-19 22:10:29 +00:00
fix(terminal): avoid lockup caused by 0-length hyperlink
This could cause a 0-length hyperlink to be present in the screen, which, in ReleaseFast, causes a lockup as the string alloc tries to iterate `1..0` to allocate 0 chunks.
This commit is contained in:
@@ -2146,7 +2146,13 @@ pub fn cursorSetHyperlink(self: *Screen) !void {
|
||||
);
|
||||
|
||||
// Retry
|
||||
return try self.cursorSetHyperlink();
|
||||
//
|
||||
// We check that the cursor hyperlink hasn't been destroyed
|
||||
// by the capacity adjustment first though- since despite the
|
||||
// terrible code above, that can still apparently happen ._.
|
||||
if (self.cursor.hyperlink_id > 0) {
|
||||
return try self.cursorSetHyperlink();
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user