This commit is contained in:
Mitchell Hashimoto
2024-04-02 08:38:51 -07:00
parent 555f6e159f
commit eb2a2e3931
4 changed files with 8 additions and 8 deletions

View File

@ -26,7 +26,7 @@ pub inline fn copy(comptime T: type, dest: []T, source: []const T) void {
/// and a tmp var for the single rotated item instead of 3 calls to reverse.
pub inline fn rotateOnce(comptime T: type, items: []T) void {
const tmp = items[0];
move(T, items[0..items.len - 1], items[1..items.len]);
move(T, items[0 .. items.len - 1], items[1..items.len]);
items[items.len - 1] = tmp;
}

View File

@ -1331,8 +1331,8 @@ fn rowWillBeShifted(
// spacer head will be either moved or cleared, so we also need
// to turn the spacer heads in to empty cells in that case.
if (self.scrolling_region.right == self.cols - 1 or
self.scrolling_region.left < 2
) {
self.scrolling_region.left < 2)
{
const end_cell: *Cell = &cells[page.size.cols - 1];
if (end_cell.wide == .spacer_head) {
end_cell.wide = .narrow;

View File

@ -184,7 +184,7 @@ pub const Page = struct {
pub fn reinit(self: *Page) void {
// We zero the page memory as u64 instead of u8 because
// we can and it's empirically quite a bit faster.
@memset(@as([*]u64, @ptrCast(self.memory))[0..self.memory.len / 8], 0);
@memset(@as([*]u64, @ptrCast(self.memory))[0 .. self.memory.len / 8], 0);
self.* = initBuf(OffsetBuf.init(self.memory), layout(self.capacity));
}