Skip to content
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

Place the cursor at the end of the error when block on error mode is active #963

Merged
merged 2 commits into from
Dec 11, 2024

Conversation

rtetley
Copy link
Collaborator

@rtetley rtetley commented Dec 11, 2024

Closes #952

…r is active

Until now, the cursor remained at the last correctly executed sentence.
@gares
Copy link
Member

gares commented Dec 11, 2024

From the patch I can't tell if the error range is the range of the sentence (that you color with a red fading bg), or the error you underline.

I think the optimum would be the latter. Eg

Definition foo := not_existent 3.

should place my cursor at | and underline ^:

Definition foo := not_existent| 3.
                  ^^^^^^^^^^^^

and not

Definition foo := not_existent 3.|
                  ^^^^^^^^^^^^

Sometimes the error range does not span the whole line. In that case,
place the cursor at the end of the error range not the line.
@rtetley rtetley merged commit ca8209f into main Dec 11, 2024
27 of 28 checks passed
@rtetley rtetley deleted the error-cursor-position branch December 13, 2024 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

enhancement: place cursor at error
2 participants