I noticed that when running a tcell application under tmux using
TERM=screen-256color, some text rendered with style attributes
like bold and underline appeared preceded with "17". This seemed
to come from tcell sending "AttrOff"/sgr0, which in
term_screen_256xcolor.go looks like:
AttrOff: "\x1b[m\x0017"
infocmp screen-256color expresses sgr0 like this:
sgr0=\E[m\017
This terminfo man page implies that \017 should be interpreted as
the octal representation of 15 decimal.
https://www.mkssoftware.com/docs/man5/terminfo.5.asp
The terminfo generator mkinfo.go parses the \0 as a zero, then
the following 17 as the digits 1 and 7. This patch modifies
mkinfo.go and results in the following instead
AttrOff: "\x1b[m\x0f"
This seems to clear up the "17" problem for me. But I am not a
terminal expert by any means, so perhaps my interpretation is
incorrect!
We add st, st-meta, and the -256color and -truecolor variants.
Note that the -truecolor variant was NOT described in the st.info
file, but st uses the same color escapes that everyone else does
for 24-bit color.
This completely restructures the database of terminal types, putting
each terminal in its own file. We also compress the database files,
and use infocmp instead of trying to use the C level API.
The mkdatabase script will rebuild the entire database from the terminfo
files on the system. Individual entries can also be built by simply running
the mkinfo program with the terminal type.
fixes#164 KeyEscape does not work in Go 1.9 under Linux
This is a complete refactor of the input loop for UNIX systems.
We use a blocking reader on the TTY, and a separate select
loop for timers and other events. This means that our idle
use should be low now.
* Fix cScreen.Fini() race condition
Closesgdamore/tcell#158
* Tidy up Windows magic, and fix event ordering
* Move a couple of magic values into constants
* Add more explanatory comments
* Fix ordering WaitForMultipleObjects to give cancellation priority
* Also correct some indentation and minor formatting stuff.
* Use `chan struct{}` for `scandone` to not deadlock
We test 1.5 and newer only. Arguably we could probably stop testing
anything older than 1.7, but some folks will still be using older
versions of golang. Note that 1.3 is definitely busted.
- Widget might be using not just View but other mechanisms for rendering
aware of the view size (e.g. ViewPort).
- By updating the view reference out of Widget, Widget doesn't have a
chance to react on this layout algorithm
- That's an existing bug that happens when we try to use CellView inside
of an BoxLayout
- Widget might be using not just View but other mechanisms for rendering
aware of the view size (e.g. ViewPort).
- By updating the view reference out of Widget, Widget doesn't have a
chance to react on this layout algorithm
- That's an existing bug that happens when we try to use CellView inside
of an BoxLayout
* Make keyNames variable public
This map of variables might be useful to applications wanting to convert text to keys, e.g. for key bindings.
* Document KeyNames variable