Instead of having the hard line numbers alternate colors, give soft
wrapped lines their own lighter color. This still gives a nice
visual cue when lines are wrapped, but isn't as generally distracting.
It's a mess of indirection and over-abstraction, and this commit
is the first step at cleaning that up. In addition to making the
code easier to follow, it's also notably faster.
The only downside is we've (temporarily) lost indentation
continuation on line wrapping. But that can be added back without
too much trouble later.
Originally I was using just `(usize, usize)` for marks, and `Vec`s
of those for sets. But that was already becoming unwieldy even for
really basic code. This abstracts just a handful of common
operations away to make this easier to reason about. However,
the internals are (intentionally) left exposed to allow other fiddly
things to be done.
Otherwise is was just getting swallowed in the alternate terminal
buffer. This was especially annoying with panics, since their
messages and backtraces got completely swallowed.
This is very WIP. The intent is for these to be used for e.g.
cursors, screen positions, etc. The intent is for the buffer
itself to keep them synced properly with the actual text on edits,
although this is not yet implemented.
This should (hopefully) make led work on Windows now. Although
I don't have a Windows box to test on.
This also fixes a bug where control codes were ocassionally split
on input, resulting in e.g. a pg-down resulting in control
characters inserted into the buffer.
They are largely auto-generated from text-based tables from the
WHATWG encoding standard. Most of them are still not available
in the code itself, but they are generating correctly, and exposing
them is just a matter of boiler plate.