From 8cff861f38c3b82a1504d88a8a067bc32dc10da7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Sat, 29 Jun 2019 21:16:06 +0200 Subject: [PATCH] terminal: move print_needs_wrap from grid to terminal --- terminal.c | 2 +- terminal.h | 3 +-- vt.c | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/terminal.c b/terminal.c index cce4e29f..dcff32e3 100644 --- a/terminal.c +++ b/terminal.c @@ -210,7 +210,7 @@ term_cursor_to(struct terminal *term, int row, int col) term_damage_update(term, term->cursor.linear, 1); term_damage_update(term, new_linear, 1); - term->grid.print_needs_wrap = false; + term->print_needs_wrap = false; term->cursor.linear = new_linear; term->cursor.col = col; diff --git a/terminal.h b/terminal.h index 8e93d209..5fb30e77 100644 --- a/terminal.h +++ b/terminal.h @@ -62,8 +62,6 @@ struct damage { }; struct grid { - bool print_needs_wrap; - struct cell *cells; struct cell *normal_grid; struct cell *alt_grid; @@ -144,6 +142,7 @@ struct terminal { int cell_width; int cell_height; + bool print_needs_wrap; struct scroll_region scroll_region; struct rgba foreground; diff --git a/vt.c b/vt.c index 92991672..c6d05d46 100644 --- a/vt.c +++ b/vt.c @@ -670,7 +670,7 @@ action(struct terminal *term, enum action action, uint8_t c) break; case ACTION_PRINT: { - if (term->grid.print_needs_wrap) { + if (term->print_needs_wrap) { if (term->cursor.row == term->scroll_region.end - 1) { term_scroll(term, 1); term_cursor_to(term, term->cursor.row, 0); @@ -697,7 +697,7 @@ action(struct terminal *term, enum action action, uint8_t c) if (term->cursor.col < term->cols - 1) term_cursor_right(term, 1); else - term->grid.print_needs_wrap = true; + term->print_needs_wrap = true; break; }