diff options
Diffstat (limited to 'terminal.c')
| -rw-r--r-- | terminal.c | 11 |
1 files changed, 4 insertions, 7 deletions
@@ -1090,8 +1090,8 @@ term_reset(struct terminal *term, bool hard) term->normal.offset = term->normal.view = 0; term->alt.offset = term->alt.view = 0; for (size_t i = 0; i < term->rows; i++) { - memset(grid_row_and_alloc(&term->normal, i)->cells, 0, term->cols * sizeof(struct cell)); - memset(grid_row_and_alloc(&term->alt, i)->cells, 0, term->cols * sizeof(struct cell)); + term->normal.rows[i] = grid_row_alloc(term->cols, true); + term->alt.rows[i] = grid_row_alloc(term->cols, true); } for (size_t i = term->rows; i < term->normal.num_rows; i++) { grid_row_free(term->normal.rows[i]); @@ -1253,6 +1253,7 @@ static inline void erase_line(struct terminal *term, struct row *row) { erase_cell_range(term, row, 0, term->cols - 1); + row->linebreak = false; } void @@ -1498,17 +1499,13 @@ term_scroll_reverse(struct terminal *term, int rows) void term_formfeed(struct terminal *term) { - int col = term->cursor.point.col; - if (!term->cursor.lcf) - col--; - if (col >= 0) - term->grid->cur_row->cells[col].attrs.linefeed = 1; term_cursor_left(term, term->cursor.point.col); } void term_linefeed(struct terminal *term) { + term->grid->cur_row->linebreak = true; if (term->cursor.point.row == term->scroll_region.end - 1) term_scroll(term, 1); else |
