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.pull/9645/head
parent
bee5875351
commit
995a7377c1
|
|
@ -2146,7 +2146,13 @@ pub fn cursorSetHyperlink(self: *Screen) !void {
|
||||||
);
|
);
|
||||||
|
|
||||||
// Retry
|
// 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();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue