Age | Commit message (Collapse) | Author |
|
|
|
|
|
The biggest change here is moving various element classes under
more scope-specific directories, which helps to avoid circular
dependencies and is just cleaner to navigate and expand in the
future.
Otherwise this is a largely uncritical port to ESM module syntax!
There are probably a number of changes and other cleanups that
remain much needed.
Whenever I make changes to tui-lib it's hard to believe it's
already been <INSERT COUNTING NUMBER HERE> years since the
previous time. First commits are from January 2017, and the
code originates a month earlier in KAaRMNoD!
|
|
Particularly, this added a new event listener (i.e. function) every time
the screen was resized, which would never be garbage collected.
Oops.
|
|
|
|
|
|
This allows pretty much any code based around measureColumns
(e.g. buttons, labels, word-wrapping code) to handle ANSI-formatted
text without any miscalculated measurements.
|
|
|
|
...instead of using the old loop system.
|
|
|
|
|
|
This is a very large change and probably breaks most applications not
built to work with it. (Obviously, I'm not really being that responsible
with this sort of thing.) I've tested with mtui and it works fine, but
some elements may need tweaks before being 100% adjusted to the new
scheduled-render system we're using with this commit. Also, any elements
which have custom draw behavior will likely need updating so that they
appropriately schedule renders.
|
|
|
|
|
|
|
|
...for mouse events. Contains cursor position, modifier keys pressed,
etc.
|
|
Same as 'screenSizeUpdated'.
|
|
|
|
|
|
|
|
This way when a program is exited, the mouse will go back to normal (so
you can scroll the terminal log, etc).
|
|
Reference:
http://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Mouse-Tracking
For some reason this works better with tmux than X10 mouse (and it still
works in ordinary, non-tmux windows).
|
|
Not exactly the most elegant implementation, but it definitely works and
isn't really difficult to code around!
|
|
This way layouts can properly support wide characters.
|
|
|
|
If it makes sense to reuse an attributes array, do that.
|
|
(reverted broken stuff; still a little optimization, i.e. cache
cursorIndex)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Show the number of KB saved
* Make the percent-saved a little more precise
* Don't update the debug message if absolutely nothing changed on the
screen (although, it's still saving however much data it would have
taken to render the entire screen!!)
* Just draw a bar across the whole screen, instead of a few extra " "
characters - technically this adds a whole bunch of data itself but
it's assumed that you aren't on limited data if you're debugging how
much data the interpreter saves
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- Whether the cursor is displayed or not is now based on the
cursorVisible property rather than whether cursorX and cursorY
are set or not.
- The actual shell cursor is now invisible... this is objectively
an act of Evil, though! This doesn't look like too hard to
fix, thankfully.
- A new cleanCursor function has been added to ansi.js.
|
|
..Obviously this breaks old things (particularly, see changes in
FocusElement).
|
|
|