mirror of
https://github.com/tmux/tmux.git
synced 2025-09-01 20:57:00 +00:00
Add support for OSC 8 hyperlinks (a VTE extension now supported by other
terminals such as iTerm2). Originally written by me then extended and completed by first Will Noble and later Jeff Chiang. GitHub issues 911, 2621, 2890, 3240.
This commit is contained in:
14
screen.c
14
screen.c
@ -90,6 +90,7 @@ screen_init(struct screen *s, u_int sx, u_int sy, u_int hlimit)
|
||||
s->sel = NULL;
|
||||
|
||||
s->write_list = NULL;
|
||||
s->hyperlinks = NULL;
|
||||
|
||||
screen_reinit(s);
|
||||
}
|
||||
@ -119,6 +120,17 @@ screen_reinit(struct screen *s)
|
||||
|
||||
screen_clear_selection(s);
|
||||
screen_free_titles(s);
|
||||
screen_reset_hyperlinks(s);
|
||||
}
|
||||
|
||||
/* Reset hyperlinks of a screen. */
|
||||
void
|
||||
screen_reset_hyperlinks(struct screen *s)
|
||||
{
|
||||
if (s->hyperlinks == NULL)
|
||||
s->hyperlinks = hyperlinks_init();
|
||||
else
|
||||
hyperlinks_reset(s->hyperlinks);
|
||||
}
|
||||
|
||||
/* Destroy a screen. */
|
||||
@ -137,6 +149,8 @@ screen_free(struct screen *s)
|
||||
grid_destroy(s->saved_grid);
|
||||
grid_destroy(s->grid);
|
||||
|
||||
if (s->hyperlinks != NULL)
|
||||
hyperlinks_free(s->hyperlinks);
|
||||
screen_free_titles(s);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user