mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-16 08:46:08 +03:00
Merge pull request #2508 from qwerasd205/fix-map-capacity-off-by-1
fix(PageList, Page): fix off-by-1 in map capacity checks
This commit is contained in:
@ -896,7 +896,7 @@ const ReflowCursor = struct {
|
||||
|
||||
// If our page can't support an additional cell with
|
||||
// graphemes then we create a new page for this row.
|
||||
if (self.page.graphemeCount() >= self.page.graphemeCapacity() - 1) {
|
||||
if (self.page.graphemeCount() >= self.page.graphemeCapacity()) {
|
||||
try self.moveLastRowToNewPage(list, cap);
|
||||
} else {
|
||||
// Attempt to allocate the space that would be required for
|
||||
@ -924,7 +924,7 @@ const ReflowCursor = struct {
|
||||
|
||||
// If our page can't support an additional cell with
|
||||
// a hyperlink ID then we create a new page for this row.
|
||||
if (self.page.hyperlinkCount() >= self.page.hyperlinkCapacity() - 1) {
|
||||
if (self.page.hyperlinkCount() >= self.page.hyperlinkCapacity()) {
|
||||
try self.moveLastRowToNewPage(list, cap);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user