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 text input cursor jumping to the end #548

Merged
merged 2 commits into from
Aug 11, 2024
Merged

Conversation

sgued
Copy link
Contributor

@sgued sgued commented Aug 11, 2024

Fix #532

See #532 (comment) for the explanation of what this PR fixes.

This PR fixes it by adding a "cache" of the previous state of the buffer that skips updating the cursor position if the buffer is the same after the update.

Ideally there should be a way to distinguish updates "from inside" and updates "from outside", so that the effect could simply not be run.

See lapce#532 (comment) for the
explanation of what this PR fixes.

This PR fixes it by adding a "cache" of the previous state of the buffer
that skips updating the cursor position if the buffer is the same after the update
@dzhou121
Copy link
Contributor

Thanks for working on it. But there's plan to replace the current text_input with a new implementation backed by 'text_editor`.

@sgued
Copy link
Contributor Author

sgued commented Aug 11, 2024

Having only one text editor view seems like a great idea. Should this be merged nonetheless to fix programs using main?

@dzhou121
Copy link
Contributor

Makes sense, since we don't know when the new text input will be implemented :)

@dzhou121 dzhou121 merged commit 2d17082 into lapce:main Aug 11, 2024
7 checks passed
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.

Inserting text in the middle of a textbox is impossible
2 participants