-
-
Notifications
You must be signed in to change notification settings - Fork 393
Fixing cursor movements between lines + Improvement editor actions model + adding editor test cases + improving editor tests builders #18511
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
base: Pharo14
Are you sure you want to change the base?
Conversation
This issue has either a default title or empty body. We would appreciate it if you could provide more information. Note: I am not a very intelligent bot, I can only react to new comments. Please add a comment for me if you update the body or title. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was done during the latest sprint, but we didn't have the time to finish. TODOs:
- Invalidate
virtualColumn
when:- Text is inserted
- Text is deleted
- There's a mouse click
- Probably other cases I'm forgetting
- Remove/deprecate methods that've become unnecessary
- Test if all actions still work fine with
shift
- Write a PR description
… to move between words too
- Inserting text - Deleting text - Clicking
Small refactor and add tests
Fixing cursor movements between lines + Improvement editor actions model + adding editor test cases + improving editor tests builders
In this pr, with @m-demare and @JMLF, we were working on the text editor features. In particular, we modelled the concept of a visual column. As part of this work, we improved the text editor model by representing
Editor Actions
. Each action now knows about how much to move the cursor.The editor, on the other hand, is the one who is familiar with the visual and virtual columns.
As part of this work, we improved the editor text test builders by simplifying the contract with these methods. Here is an example of what a new test case looks like:
The new model considers the next actions:
The feature fix
Before
Before the behavior/experience was as follows:
Screen_Recording_2025-09-26_at_15.07.07.mov
After
Note that the cursor position "remembers" the original column position ( visual position ):
Screen_Recording_2025-09-26_at_15.03.23.mov
We introduce a test case for each possible scenario regarding this feature ( pressing shift and/or cmd while you move the cursor). Also, we added new test cases for those scenarios that weren't contemplated before.
We also removed the deprecated behavior.