This commit is contained in:
Mitchell Hashimoto
2022-08-29 20:26:02 -07:00
parent 39376feae0
commit 36140d3ee9
3 changed files with 13 additions and 3 deletions

View File

@ -5,13 +5,14 @@ Bugs:
Performance:
* libuv allocates on every read, we should use a read buffer pool
* update cells should only update the changed cells
* for scrollback, investigate using segmented list for sufficiently large
scrollback scenarios.
* scrollback: dynamic growth rather than prealloc
* reflow: text reflow is really poorly implemented right now specifically
for shrinking columns. Look into this. This may require changing the
screen data structure.
* Screen cell structure should be rethought to use some data oriented design,
also bring it closer to GPU cells, perhaps.
Correctness:
@ -23,6 +24,7 @@ Correctness:
- need fallback glyphs if they're not supported
- can effect a crash using `vttest` menu `3 10` since it tries to parse
ASCII as UTF-8.
* Graphemes need to be detected and treated as a single unit
Improvements:

View File

@ -92,9 +92,13 @@ pub const Cell = struct {
test {
// We use this test to ensure we always get the right size of the attrs
const cell: Cell = .{ .char = 0 };
_ = @bitCast(u8, cell.attrs);
try std.testing.expectEqual(1, @sizeOf(@TypeOf(cell.attrs)));
}
log.warn("CELL={}", .{@sizeOf(Cell)});
test {
//log.warn("CELL={}", .{@sizeOf(Cell)});
try std.testing.expectEqual(16, @sizeOf(Cell));
}
};

View File

@ -94,10 +94,14 @@ pub const Name = enum(u8) {
};
/// RGB
pub const RGB = struct {
pub const RGB = packed struct {
r: u8,
g: u8,
b: u8,
test {
try std.testing.expectEqual(@as(usize, 3), @sizeOf(RGB));
}
};
test "palette: default" {