From 3c6239c66f0ea758655a891492073fd3549cd877 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Sun, 21 Nov 2021 14:13:27 +0100 Subject: term: print: re-order col/row/cell assigments --- terminal.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/terminal.c b/terminal.c index ea7da6e3..1da97335 100644 --- a/terminal.c +++ b/terminal.c @@ -3202,15 +3202,14 @@ term_print(struct terminal *term, wchar_t wc, int width) /* *Must* get current cell *after* linewrap+insert */ struct row *row = grid->cur_row; - struct cell *cell = &row->cells[col]; + row->dirty = true; + row->linebreak = true; + struct cell *cell = &row->cells[col]; cell->wc = term->vt.last_printed = wc; cell->attrs = term->vt.attrs; - row->dirty = true; - row->linebreak = true; - - int uri_start = col; + const int uri_start = col; /* Advance cursor the 'additional' columns while dirty:ing the cells */ for (int i = 1; i < width && col < term->cols - 1; i++) { @@ -3250,16 +3249,16 @@ ascii_printer_fast(struct terminal *term, wchar_t wc) /* *Must* get current cell *after* linewrap+insert */ int col = grid->cursor.point.col; + const int uri_start = col; + struct row *row = grid->cur_row; - struct cell *cell = &row->cells[col]; + row->dirty = true; + row->linebreak = true; + struct cell *cell = &row->cells[col]; cell->wc = term->vt.last_printed = wc; cell->attrs = term->vt.attrs; - row->dirty = true; - row->linebreak = true; - - int uri_start = col; /* Advance cursor */ if (unlikely(++col >= term->cols)) { -- cgit v1.3