fn new_line(&mut self) {
        for row in 1..BUFFER_HEIGHT {
            for column in 0..BUFFER_WIDTH {
                let byte = self.buffer.chars[row][column].read();
                self.buffer.chars[row - 1][column].write(byte);
            }
        }

        self.clear_row(BUFFER_HEIGHT - 1); // clear the bottom line
        self.column_position = 0; // reset column position
    }
// new_line moves the whole lines upwards to create one new line at the bottom of the screen.
new_line moves the whole lines upwards to create one new line at the bottom of the screen.
new_line moves the whole lines upwards to create one new line at the bottom of the screen .
fn new_line(&mut self) {
        for row in 1..BUFFER_HEIGHT {
            for column in 0..BUFFER_WIDTH {
                let byte = self.buffer.chars[row][column].read();
                self.buffer.chars[row - 1][column].write(byte);
            }
        }
        self.clear_row(BUFFER_HEIGHT - 1); // clear the bottom line
        self.column_position = 0; // reset column position
    }
fn new_line ( & mut self ) { for row in 1 .. BUFFER_HEIGHT { for column in 0 .. BUFFER_WIDTH { let byte = self . buffer . chars [ row ] [ column ] . read ( ) ; self . buffer . chars [ row - 1 ] [ column ] . write ( byte ) ; } } self . clear_row ( BUFFER_HEIGHT - 1 ) ; // clear the bottom line self . column_position = 0 ; // reset column position }
new_line moves the whole lines upwards to create one new line at the bottom of the screen.
new_line moves the whole lines upwards to create one new line at the bottom of the screen .
&mut self