aboutsummaryrefslogtreecommitdiff
path: root/terminal.h
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2021-07-11 08:06:12 +0000
committerDaniel Eklöf <daniel@ekloef.se>2021-07-11 08:06:12 +0000
commitcf6d04f9f2fcb7a4f12d35edd0a6d4cd5591b59c (patch)
tree217f81455961b1ad6df63100e24c9d179598a259 /terminal.h
parentwayland: explicitly purge all SHM pixmaps when destroying window (diff)
url-mode: fix crash when removing duplicate and/or overlapping URLs
Removing overlaping and duplicated URLs is done by running two nested loops, that both iterate the same URL list. When a duplicate is found, one of the URLs is destroyed and removed from the list. Deleting and removing an item *is* safe, but only as long as _no other_ iterator has references to it. In this case, if we remove an item from e.g. the inner iterator, we’ll crash if the outer iterator’s *next* item is the item being removed. Closes #627
Diffstat (limited to 'terminal.h')
-rw-r--r--terminal.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/terminal.h b/terminal.h
index 94c1cf75..309f7db6 100644
--- a/terminal.h
+++ b/terminal.h
@@ -264,6 +264,7 @@ struct url {
enum url_action action;
bool url_mode_dont_change_url_attr; /* Entering/exiting URL mode doesn’t touch the cells’ attr.url */
bool osc8;
+ bool duplicate;
};
typedef tll(struct url) url_list_t;