-
Notifications
You must be signed in to change notification settings - Fork 31k
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
We need a API - positionAt(byte offset) #5735
Comments
We also need the API _byteOffsetAt_ which just like TextDocument.offsetAt |
> detail: microsoft/vscode#5735 > > We should replace this code if microsoft/vscode#5735 is accepted.
fyi @alexandrudima |
@owt5008137 clang-format seems to have a line-based mode. http://clang.llvm.org/docs/ClangFormat.html any special reasons you don't use 'lines' for what you want to achieve? |
@jrieken We allow users only format the selected codes, and any user can select any code section, with or without the whole line. |
Understood, still you should consider using that since add support for bytes won't come soon as this is a huge effort across our whole stack |
This feature request will not be considered in the next 6-12 months roadmap and as such will be closed to keep the number of issues we have to maintain actionable. Thanks for understanding and happy coding! |
Does the reopening of this mean it will be considered? At coder, we need this feature for our collaborative editing to work performantly. Could you provide a outline on exactly what needs to be done where and we might be able to get a PR in for it. |
We closed this issue because we don't plan to address it in the foreseeable future. You can find more detailed information about our decision-making process here. If you disagree and feel that this issue is crucial: We are happy to listen and to reconsider. If you wonder what we are up to, please see our roadmap and issue reporting guidelines. Thanks for your understanding and happy coding! |
I want to make the extension "clang-format" work better with chinese(or other asia languages).But clang-format only provide byte offsets of a text.Using TextDocument.positionAt, we will got a Position object with charactor offset but not byte offset.
Steps to Reproduce:
I think it's better for vscode provide a API to do so, than we analysis all the content again.
The text was updated successfully, but these errors were encountered: