terminal2: selection adjust done

This commit is contained in:
Mitchell Hashimoto
2024-03-06 09:16:19 -08:00
parent 7afe2e1eca
commit 3f59f51d40

View File

@ -184,19 +184,18 @@ pub fn adjust(
} }
}, },
// .page_up => if (screen.rows > result.end.y) { .page_up => if (self.end.up(s.pages.rows)) |new_end| {
// result.end.y = 0; self.end.* = new_end;
// result.end.x = 0; } else {
// } else { self.adjust(s, .home);
// result.end.y -= screen.rows; },
// },
// // TODO(paged-terminal): this doesn't take into account blanks
// .page_down => if (screen.rows > screen_end - result.end.y) { .page_down => if (self.end.down(s.pages.rows)) |new_end| {
// result.end.y = screen_end; self.end.* = new_end;
// result.end.x = screen.cols - 1; } else {
// } else { self.adjust(s, .end);
// result.end.y += screen.rows; },
// },
.home => self.end.* = s.pages.pin(.{ .screen = .{ .home => self.end.* = s.pages.pin(.{ .screen = .{
.x = 0, .x = 0,
@ -219,8 +218,6 @@ pub fn adjust(
} }
} }
}, },
else => @panic("TODO"),
} }
} }