Closed jamesragray closed 1 year ago
One thing I need to check is that if two Graphemes consist of the same sequence of dchars then they produce the same hash. Another thing is whether one needs to worry about the graphemeWidth associative array becoming too large.
I'm gonna have to actually revert this or something, it caused a major performance regression to the point where in some cases you can see the characters write out one at a time.
That sounds bad. Revert it for now and I will try and make a new pull request when I have time.
An alternative might be to make the cursorX/Y getters go ahead and fetch if there's been a write since last time you asked. I might do that.
This is my idea:
https://github.com/adamdruppe/arsd/commit/0ba0dc222ed131b17f464a89068b4dfe5961b068
Don't even try to guess, just track if it might have changed since the last call, and if so, query the terminal for an authoritative answer.
If it passes your tests we can tag.
Not heavily tested. Just used it with my editor with a few emoji's.