mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-22 11:46:11 +03:00
assertions to save our bacon
This commit is contained in:
@ -444,6 +444,13 @@ pub fn copyRow(self: *Screen, dst: usize, src: usize) void {
|
||||
/// This will trim data if the size is getting smaller. This will reflow the
|
||||
/// soft wrapped text.
|
||||
pub fn resize(self: *Screen, alloc: Allocator, rows: usize, cols: usize) !void {
|
||||
defer {
|
||||
assert(self.cursor.x < self.cols);
|
||||
assert(self.cursor.y < self.rows);
|
||||
assert(self.rows == rows);
|
||||
assert(self.cols == cols);
|
||||
}
|
||||
|
||||
// If the rows increased, we alloc space for the new rows (w/ existing cols)
|
||||
// and move the viewport such that the bottom is in view.
|
||||
if (rows > self.rows) {
|
||||
|
Reference in New Issue
Block a user