« get me outta code hell

tui-lib - Pure Node.js library for making visual command-line programs (ala vim, ncdu)
about summary refs log tree commit diff
path: root/util/ansi.js
AgeCommit message (Collapse)Author
2020-07-15don't include ANSI escape codes in measureColumnsFlorrie
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.
2019-09-15(!!) Only render when draw-dependency props changeFlorrie
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.
2019-08-22Add setBackground ansi utility functionFlorrie
2019-08-22Add trimToColumns ansi utility functionFlorrie
2019-07-18Mouse drag support; pass detailed data to handlersFlorrie
...for mouse events. Contains cursor position, modifier keys pressed, etc.
2019-01-25Expose xterm alternate screenFlorrie
2018-12-08Stop tracking mouse on cleanCursor()Florrie
This way when a program is exited, the mouse will go back to normal (so you can scroll the terminal log, etc).
2018-12-08Set VT200 mouse instead of X10 mouseFlorrie
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).
2018-12-08Mouse supportFlorrie
Not exactly the most elegant implementation, but it definitely works and isn't really difficult to code around!
2018-12-05Add utility measureColumns function to ansi.jsFlorrie
This way layouts can properly support wide characters.
2018-12-05Wide character support in ANSI compressorFlorrie
2018-12-04Optimize - don't do attributes.slice() as oftenFlorrie
If it makes sense to reuse an attributes array, do that.
2018-12-04Un-broken optimizationFlorrie
(reverted broken stuff; still a little optimization, i.e. cache cursorIndex)
2018-12-04Broken optimizationFlorrie
2017-12-10Show/hide cursor in ANSI interpreterFlorrie
2017-12-10Clean up old state code in ANSI interpreterFlorrie
2017-12-10Set the ANSI compressor on OVERLOAD (underload?)Florrie
2017-12-10Interpret 'off' SGR commands in ANSI interpreterFlorrie
2017-12-09Make ansi interpreter work with selective control sequencesFlorrie
2017-12-08Add invertOff ansi functionFlorrie
2017-07-03Improve cursor displayliam4
- 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.
2017-07-03A long-due cleanup + examples + thingsliam4
..Obviously this breaks old things (particularly, see changes in FocusElement).