Release v0.7.0 - TextBuffer and partial attribute markings
The latest release of JCLI has been released, introducing a new feature, as we all as
partial @safe, @nogc
, etc. markings.
Changes
The following changes were implemented:
- Feature - Added
populateActiveAnsiComponents
andcreateAnsiCommandString
free-standing functions. - Feature - Most of
ansi.d
has now been made public, with a slight refactor in order to create a more user-friendly way of handling. - Feature - Add
TextBuffer
and related types, as well as an example project for it. - Feature - Add
AnsiText.rawText
to get the raw string for anAnsiText
. - Tweak - Most of the project is now marked
@safe
, other attributes such as@nogc, nothrow, and pure
have been added where possible. - Tweak - Silly is now used as JCLI's test runner.
- Tweak -
AnsiText
is slightly more efficient with caching. - Fix - Remove a stray
writeln
fromUserIO.log
TextBuffer
The main feature, which I spent way more time developing, is TextBuffer
.
TextBuffer is an Ansi-enabled buffer of characters, exposed as a 2D grid of characters with associated Ansi data (foreground, background, and flags).
I was developing a (now scrapped) table component for JCLI, but was running into frustrations of having to handle the fact that Ansi strings contain invisible characters, that are a bit annoying to measure.
So I thought: "What if I make something that makes messing with Ansi text easier?", and thus, TextBuffer was born.
I'd like to point you over to its example, and here's a screenshot of its output:
Reminder
In the event that there's actually someone else other than me that uses this library, I'd just like to remind you that I'm completely open to suggestions, criticism, PRs, etc.