diff options
Diffstat (limited to 'url-mode.c')
| -rw-r--r-- | url-mode.c | 23 |
1 files changed, 16 insertions, 7 deletions
@@ -469,16 +469,20 @@ remove_overlapping(url_list_t *urls, int cols) */ xassert(in->osc8 || out->osc8); - if (in->osc8) { - url_destroy(&outer->item); - tll_remove(*urls, outer); - } else { - url_destroy(&inner->item); - tll_remove(*urls, inner); - } + if (in->osc8) + outer->item.duplicate = true; + else + inner->item.duplicate = true; } } } + + tll_foreach(*urls, it) { + if (it->item.duplicate) { + url_destroy(&it->item); + tll_remove(*urls, it); + } + } } void @@ -649,6 +653,11 @@ tag_cells_for_url(struct terminal *term, const struct url *url, bool value) c = 0; row = term->grid->rows[r]; + if (row == NULL) { + /* Un-allocated scrollback. This most likely means a + * runaway OSC-8 URL. */ + break; + } row->dirty = true; } } |
