Do not leak hyperlinks in copy mode, from Barrett Ruth in GitHub issue

5020.
This commit is contained in:
nicm
2026-04-22 07:03:06 +00:00
parent 0835980ef1
commit 314f0ae964

View File

@@ -463,8 +463,10 @@ window_copy_init(struct window_mode_entry *wme,
data->scroll_exit = args_has(args, 'e');
data->hide_position = args_has(args, 'H');
if (base->hyperlinks != NULL)
if (base->hyperlinks != NULL) {
hyperlinks_free(data->screen.hyperlinks);
data->screen.hyperlinks = hyperlinks_copy(base->hyperlinks);
}
data->screen.cx = data->cx;
data->screen.cy = data->cy;
data->mx = data->cx;