This supports now curly, double, dashed, and dotted underline styles
where trhe terminal supports it. This works well on Windows Terminal,
reasonably on iTerm2, Alacritty, Kitty, and probably others.
The wasm mode terminal includes support for this, dependent on the browser
capabilities.
The macOS Terminal just changes the background color. Legacy Windows
console does nothing.
We will try to provide a regular underscore as a fallback. A new style.go
demo is included to see some style combinations.
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")
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.)
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.
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.