Open yuI4140 opened 1 year ago
New func (it's a placeholder) :
impl Writer {
fn new_line(&mut self) {
// Move cursor to the next line
self.column_position = 0;
if self.row == BUFFER_HEIGHT - 1 {
// Scroll the buffer if the cursor is at the bottom of the screen
for row in 1..BUFFER_HEIGHT {
for col in 0..BUFFER_WIDTH {
let character = self.buffer.chars[row][col].read();
self.buffer.chars[row - 1][col].write(character);
}
}
// Clear the last row
self.clear_row(BUFFER_HEIGHT - 1);
} else {
self.row += 1;
}
}
}
there are functions that are missing and variables that are not in the scope