terminal: osc8_close(): refactor: use grid_row_add_uri_range()

This commit is contained in:
Daniel Eklöf 2021-02-14 20:50:55 +01:00
parent d42b129814
commit 7f13d0084e
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -3049,17 +3049,13 @@ term_osc8_close(struct terminal *term)
do {
int end_col = r == end.row ? end.col : term->cols - 1;
struct row *row = term->grid->rows[r];
if (row->extra == NULL)
row->extra = xcalloc(1, sizeof(*row->extra));
struct row_uri_range range = {
.start = start_col,
.end = end_col,
.id = term->vt.osc8.id,
.uri = xstrdup(term->vt.osc8.uri),
};
tll_push_back(row->extra->uri_ranges, range);
grid_row_add_uri_range(term->grid->rows[r], range);
start_col = 0;
} while (r++ != end.row);