diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2021-11-21 13:13:27 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2021-11-21 17:09:39 +0000 |
| commit | 3c6239c66f0ea758655a891492073fd3549cd877 (patch) | |
| tree | 0f79fa0ae0e432cf4fb06f6a1890aad2f10e6024 | |
| parent | changelog: osc-8 data not being cleared when cell is overwritten (diff) | |
term: print: re-order col/row/cell assigments
| -rw-r--r-- | terminal.c | 19 |
1 files changed, 9 insertions, 10 deletions
@@ -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)) { |
