diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2023-09-20 13:39:29 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2023-09-20 13:39:29 -0700 |
commit | bd6f7d48e76182218877564e8ca672e657f4ef56 (patch) | |
tree | e2ed5bd8592ad604612fb2d8f1b49079b0103ae0 /text_tests | |
parent | c43d884b6ffb94803bee9f9e788e4b3a2f74f23b (diff) | |
download | view.love-bd6f7d48e76182218877564e8ca672e657f4ef56.tar.gz |
bugfix: clear selection when clicking above or below lines
Matt Wynne pointed out that snap.love would crash when a node went off screen. While debugging it I noticed that selection1 was being set when it shouldn't be. Turns out I introduced a bug when I fixed the inscript bug back in June (commit 9656e137742). One invariant I want to preserve is: selection1 should be unset after a mouse click (press and release without intervening drag). This invariant was violated in my bugfix back in June. I was concerned only with selection back then, and I didn't realize I was breaking the mouse click case (in a fairly subtle way; you can have selection set, and when it's set identically to the cursor everything looks the same). I think there might still be an issue in snap.love after this fix. I noticed screen_bottom1.pos was nil, and as far as I recall that should never happen.
Diffstat (limited to 'text_tests')
-rw-r--r-- | text_tests | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/text_tests b/text_tests index f39d47e..2a31131 100644 --- a/text_tests +++ b/text_tests @@ -23,6 +23,7 @@ click on wrapping line rendered from partway at top of screen click past end of wrapping line click past end of wrapping line containing non ascii click past end of word wrapping line +click below final line does nothing # cursor movement move left |