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

lsp: fix text edit handling #3644

Merged
merged 1 commit into from
Feb 25, 2024

Conversation

bhcleek
Copy link
Collaborator

@bhcleek bhcleek commented Feb 25, 2024

Fix text edit handling when multi-byte characters are involved. Use strcharpart() instead of treating the text to be modified as a slice of bytes, because the output of go#lsp#PositionOf is character position, not byte position.

Fixes #3641

Fix text edit handling when multi-byte characters are involved. Use
strcharpart() instead of treating the text to be modified as a slice of
bytes, because the output of go#lsp#PositionOf is character position,
not byte position.

Fixes fatih#3641
@bhcleek bhcleek added this to the vim-go v1.29 milestone Feb 25, 2024
@bhcleek bhcleek merged commit 99533a6 into fatih:master Feb 25, 2024
8 checks passed
bhcleek added a commit that referenced this pull request Feb 25, 2024
@bhcleek bhcleek deleted the lsp/multi-byte-edit-handling branch February 25, 2024 15:09
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.

Execution: GoFmt changes the Chinese at the end to <e4>
1 participant