couple of more temporary bugs:
find sometimes draws highlighted text in wrong place
esc after C-f sometimes ends up with cursor before screen top
But the known issues are harder.
Mouse stuff is pretty strenuous. For the first time I have to be careful
not to recompute too often. And I ran into a race condition for the
first time where resetting line.y within App.draw meant mouse clicks
were extremely unlikely to see line.y set.
Incredibly inefficient, but I don't yet know how to efficiently encode
undo mutations that can span multiple lines.
There seems to be one bug related to creating new drawings; they're not
spawning events and undoing past drawing creation has some weird
artifacts. Redo seems to consistently work, though.
I seem to often accidentally press C-n twice to go into name mode. Now
doing so overrides the previous temporary mode (name/move/delete point)
without clobbering the real shape-drawing mode.
I often find myself accidentally hovering over some shape or other when
switching modes.
One additional reason to do this: I never included it in the help. So it
hasn't been very high-priority.
I spent some time trying to reduce the duplication between identical
operations with and without the shift key pressed. However it makes
things harder to understand. If you try to process selection in
App.keychord_pressed in main.lua, you have to sometimes process the
selection before (e.g. including the state of the cursor _before_ an
arrow key takes effect), and sometimes after (e.g. copying the selection
before resetting it, even though it doesn't include a shift key)
Let's just leave things as they are.
I've written a few tests for delete_selection, but the way different
operations initialize the selection seems fairly standard and not worth
testing so far.