This repository has been archived by the owner on Jul 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 648
Fix: convert fillstruct's output to character offset #2611
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Change-Id: Ie15d7e27e0c9ad026b1c8896684851b9103e045e
Change-Id: I1470c9323cae759f1e18b4639acb09bc06c5cb6e
PTAL @ramya-rao-a |
there was a conflict, and not merged? |
I think the CI build problem is not caused by this pr, please take a look @ramya-rao-a |
problem not fixed yet! |
@ramya-rao-a Hi, there are some code snippet: type User struct {
ID int64
Name string
Age int
}
// expected
func foo1() {
u := &User{
ID: 0,
Name: "",
Age: 0,
}
fmt.Println(u)
}
// unexpected
func foo2() {
// multi-byte char
// 多字节字符
u := &User{}
fmUser{
ID: 0,
Name: "",
Age: 0,
}tln(u)
} |
…pr/stdupp/2611
ramya-rao-a
approved these changes
Apr 19, 2020
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.
The latest update 0.14.2 has this fix, Thanks @stdupp! |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The 'start', 'end' filed in fillstruct output is byte offset, but the parameter of 'editor.document.positionAt' is character offset, so if a source code include multi-byte string, vscode can't fill the struct into the right position.