ok. so I hate ANSI control sequences.
This is a good sign, I think it means I’m a sane human being with a reasonable sense of what makes a readable, easy to parse programming language.
ANSI control sequences are not sane.
What makes me say this is that some of them can be mistaken for others, namely the sequence for “Delete one line” and an invalid sequence for “a mouse cursor event happened here”.
I mean seriously.
And this crap is baked into the logic of every terminal that wants to support any well-known terminal-based program.
And you might be thinking, “well if one of them is invalid, just choose the valid one” but my control sequence parser is terrible and parses a sequence if it’s the only one that matches and there are 0 matching ones if the next character were to be matched. This is some kind of greedy prefix matching, which is needed because sequences don’t end with a sensible terminating character, but rather ANY CHARACTER YOU COULD THINK OF. breaths heavily
Anyway, I’ve pushed a really horrible hack to master and I think I’m going to call it a night.
On the plus side, I can now scroll vim
and less
in
nomad, which is epic. (Ok, so you can’t scroll up in
vim
. ffs)