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

Fix caret last fit when moving to line end #90455

Merged
merged 1 commit into from
Apr 10, 2024

Conversation

kitbdev
Copy link
Contributor

@kitbdev kitbdev commented Apr 10, 2024

INT_MAX was being used and it overflowed when subtracting 0.0 from it, which caused it to become negative, so the caret went to the start of the line.
It's not needed to be set here, since set_caret_column handles it.
It should be set to the end of the line anyway and not a high value, judging by behavior in other text editors.

For the other point in the issue, I couldn't find any problems with the caret moving down incorrectly. The caret will only go not straight down if the last fit was set to a column higher than the line end, which is intended.

@kitbdev kitbdev requested a review from a team as a code owner April 10, 2024 00:08
@KoBeWi KoBeWi added this to the 4.3 milestone Apr 10, 2024
@akien-mga
Copy link
Member

Does this also fix #90462?

@kitbdev
Copy link
Contributor Author

kitbdev commented Apr 10, 2024

Does this also fix #90462?

@akien-mga akien-mga merged commit 42e8f42 into godotengine:master Apr 10, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

@kitbdev kitbdev deleted the te-fix-caret-line-end branch April 10, 2024 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Moving caret up sometimes lands on the first column in script editor
3 participants