mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:57:43 +00:00
LibVT+Terminal: Support hyperlinks in the terminal :^)
We now support basic hyperlinking in the terminal with <OSC>;8;;URL<ST> Links are opened via LaunchServer on Ctrl+LeftMouse.
This commit is contained in:
parent
427863f275
commit
f596b12a04
7 changed files with 62 additions and 6 deletions
|
@ -60,6 +60,9 @@ struct Attribute {
|
|||
u8 foreground_color;
|
||||
u8 background_color;
|
||||
|
||||
String href;
|
||||
String href_id;
|
||||
|
||||
enum Flags : u8 {
|
||||
NoAttributes = 0x00,
|
||||
Bold = 0x01,
|
||||
|
@ -137,6 +140,8 @@ public:
|
|||
|
||||
void inject_string(const StringView&);
|
||||
|
||||
Attribute attribute_at(const Position&) const;
|
||||
|
||||
private:
|
||||
typedef Vector<unsigned, 4> ParamVector;
|
||||
|
||||
|
@ -204,6 +209,8 @@ private:
|
|||
|
||||
Attribute m_current_attribute;
|
||||
|
||||
u32 m_next_href_id { 0 };
|
||||
|
||||
void execute_escape_sequence(u8 final);
|
||||
void execute_xterm_command();
|
||||
void execute_hashtag(u8);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue