Commit Graph

19 Commits

Author SHA1 Message Date
Tim Culverhouse ede1dd5ee6 hyperlinks: fix id escape format
Commit 43efca775e added support for url IDs within OSC8 escape
sequences, however the formatting of the param is incorrect.

Use `id=` instead of `id:`

Fixes: 43efca775e ("hyperlinks: add support for optional id parameter")
2022-10-17 15:40:06 -07:00
Tim Culverhouse 43efca775e hyperlinks: add support for optional id parameter
OSC8 escape sequences allow for marking up hyperlinks in the terminal.
An optional `id` parameter is defined to allow applications to signal to
the terminal that (potentially) broken character sequences belong to the
same URL and should be treated as if they were connected.

Add support for optional id parameters, set by the application. Update
test case for ti.EnterUrl.

Fixes: https://github.com/gdamore/tcell/issues/568
Reference: https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda#hover-underlining-and-the-id-parameter
2022-10-16 22:31:33 -07:00
Garrett D'Amore e7b14a71dc fixes #300 Implement terminal hyperlinks
fixes #526 tcell emits redundant attributes

This work is inspired by, and partly derived from, work submitted by
Simon Ser (@emersion).  However, we've modified the bottom half of
the terminfo parser to better support strings properly, and are using
proper terminfo syntax.

Instead of an attribute called Hyperlink, we have called it Url
for the sake of brevity.

While here we noticed and fixed bug #526, which could badly impact slow
terminals, or slow links. This likely makes things better for folks
coming over long distance SSH connections for example.

We've also provided OSC 8 handling for all terminals which appear to
support the mouse sequences; hopefully ones that don't handle this
sensibly will just ignore it.  (Limited testing seems to show this.)
2022-04-16 10:57:21 -07:00
Oliver acf90d56d5 Fixed a typo. 2020-10-17 07:12:08 -07:00
Oliver 3907a8d921 Improved the new Style.Attributes() function. (Should not modify the existing Style object.) 2020-10-17 07:12:08 -07:00
Oliver 1575526e4d Added a function to Style that sets its attributes. Also fixed some comments. 2020-10-17 07:12:08 -07:00
Trevor Slocum da485f4734 Rename StrikeOut as StrikeThrough 2020-08-31 08:55:31 -07:00
Garrett D'Amore 9d283802ab fixes #350 Add strikeout support 2020-08-30 20:25:30 -07:00
Garrett D'Amore 5889c5f171 fixes #314 Implement `setf` & `setb`
This causes colors that are set that are low numbered to
be treated as themed colors -- basically honoring the palette
of the terminal.

The Style and Color implementations have changed quite a bit
to permit growth -- the colors are now 64-bits wide to permit
using the upper bits as flags, and to leave room for a future
alpha channel.

There is a new TrueColor() method on colors that obtains the
value as strict RGB value, and this will be used in lieu of
whatever terminal colors are provided -- giving the application
full control over the color space if they want, without
forcibly clobbering user preferences for terminals for the
vast majority of cases.

Indexed colors are created with the new PaletteColor API.
2020-08-25 22:26:48 -07:00
Nojus Gudinavičius 8572f72a22 Add support for italics 2020-04-13 07:15:39 -07:00
Garrett D'Amore 517e20bb11 fixes #79 64 bit style parts add up to 65 bits. 2015-11-18 07:03:13 -08:00
Garrett D'Amore 43f9cc0d07 fixes #75 Add goreport and fix related issues 2015-11-04 17:05:24 -08:00
Garrett D'Amore edd64b5419 fixes #71 Overlap in attributes & flags regresses style 2015-11-03 14:47:31 -08:00
Garrett D'Amore c46d32264a fixes #70 Background(), Foreground(), and Decompose() don't pass RGB 2015-11-03 12:52:42 -08:00
Garrett D'Amore e90b190a07 fixes #56 Color space must increase
fixes #55 Color names are unfortunate
2015-10-27 14:29:32 -07:00
Garrett D'Amore 7322e40c26 fixes #37 Improve docs & fix golint
fixes #38 Broke wide characters in last update
fixes #39 Clean up logic for encodings, enhance fallback options
fixes #36 Support more mouse buttons on Windows.
2015-10-08 09:48:01 -07:00
Garrett D'Amore b19d7067f2 fixes #26 Improved docs desired 2015-10-05 15:46:51 -07:00
Garrett D'Amore 385072b4a8 fixes #1 Add Windows support. 2015-09-28 23:42:13 -07:00
Garrett D'Amore b4ae936d42 Initial import of Tcell. 2015-09-26 23:37:54 -07:00