aboutsummaryrefslogtreecommitdiff
path: root/url-mode.c
diff options
context:
space:
mode:
Diffstat (limited to 'url-mode.c')
-rw-r--r--url-mode.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/url-mode.c b/url-mode.c
index 8ac5631e..94c05b3a 100644
--- a/url-mode.c
+++ b/url-mode.c
@@ -470,16 +470,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