Show the target of terminal hyperlinks when hovering over them with the mouse

Fixes #5830
This commit is contained in:
Kovid Goyal
2022-12-29 16:43:45 +05:30
parent b8abdd2b50
commit f4ac03b791
12 changed files with 122 additions and 47 deletions

View File

@@ -150,6 +150,10 @@ typedef struct {
bool is_set;
} last_visited_prompt;
PyObject *last_reported_cwd;
struct {
hyperlink_id_type id;
index_type x, y;
} current_hyperlink_under_mouse;
} Screen;
@@ -261,7 +265,7 @@ void screen_push_key_encoding_flags(Screen *self, uint32_t val);
void screen_pop_key_encoding_flags(Screen *self, uint32_t num);
uint8_t screen_current_key_encoding_flags(Screen *self);
void screen_report_key_encoding_flags(Screen *self);
bool screen_detect_url(Screen *screen, unsigned int x, unsigned int y);
int screen_detect_url(Screen *screen, unsigned int x, unsigned int y);
int screen_cursor_at_a_shell_prompt(const Screen *);
bool screen_fake_move_cursor_to_position(Screen *, index_type x, index_type y);
bool screen_send_signal_for_key(Screen *, char key);