-
Notifications
You must be signed in to change notification settings - Fork 568
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
textbox has weird behaviour with arrow keys when cursor in whitespace at EOL #1430
Comments
Okay, this comes from a combination of 8db1676 and the fact that we do not include the trailing whitespace when we calculate the width of the line. Annoyingly there's no good way to do this; there are hacky ways (involving hit-testing at end-of-line and using the returned value as our width) but nothing that feels right. I have a patch that improves the situation, but still feels weird in some circumstances, but it might be worth it for now; or we can revert 8db1676. (my patch is just doing |
This fixes the issue with the cursor jumping, but does not fix the underlying problem, which is related to us not providing a good API for including the whitespace in text width calculations. see #1430
This fixes the issue with the cursor jumping, but does not fix the underlying problem, which is related to us not providing a good API for including the whitespace in text width calculations. see #1430
This fixes the issue with the cursor jumping, but does not fix the underlying problem, which is related to us not providing a good API for including the whitespace in text width calculations. see #1430
As of #1636 this is handled by the input controller (although there is still a remaining issue with calculating whitespace width on mac, that will be fixed with the next piet release) |
arrow keys make the cursor jump around in weird ways when it's in whitespace at the end of a line, and the line has caused the textbox to scroll. There's some funny logic there around making sure we clamp the cursor to the edge of the textbox as necessary, and that may be part of the problem.
The text was updated successfully, but these errors were encountered: