mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-24 12:46:10 +03:00
terminal: relax grapheme integrity check for fast paths
This commit is contained in:
@ -56,7 +56,7 @@ pub const Attribute = sgr.Attribute;
|
||||
test {
|
||||
@import("std").testing.refAllDecls(@This());
|
||||
|
||||
// todo: make top-level imports
|
||||
// Internals
|
||||
_ = @import("bitmap_allocator.zig");
|
||||
_ = @import("hash_map.zig");
|
||||
_ = @import("size.zig");
|
||||
|
@ -207,6 +207,8 @@ pub const Page = struct {
|
||||
// trim rows without clearing data.
|
||||
// - We do not check that styles seen is exactly the same as the
|
||||
// styles count in the page for the same reason as above.
|
||||
// - We only check that we saw less graphemes than the total memory
|
||||
// used for the same reason as styles above.
|
||||
//
|
||||
|
||||
var arena = ArenaAllocator.init(alloc_gpa);
|
||||
@ -279,7 +281,7 @@ pub const Page = struct {
|
||||
}
|
||||
|
||||
// Our graphemes seen should exactly match the grapheme count
|
||||
if (graphemes_seen != self.graphemeCount()) {
|
||||
if (graphemes_seen > self.graphemeCount()) {
|
||||
log.warn(
|
||||
"page integrity violation grapheme count mismatch expected={} actual={}",
|
||||
.{ graphemes_seen, self.graphemeCount() },
|
||||
|
@ -232,7 +232,6 @@ pub const Set = struct {
|
||||
|
||||
/// No more available IDs. Perform a garbage collection
|
||||
/// operation to compact ID space.
|
||||
/// TODO: implement gc operation
|
||||
Overflow,
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user