aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/from_id.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2019-12-15 16:35:23 +0000
committerGitHub <[email protected]>2019-12-15 16:35:23 +0000
commit4e24b25c669965cf6a68c4b8e775cc83615d978a (patch)
tree7d44ca9749add5146d0672192d14df9de6c2e730 /crates/ra_hir/src/from_id.rs
parent4c1b2b921866279d014e377b958112b9e53edc52 (diff)
parent6fba427bf35bebdc7aa08a241ecbe83a2f725127 (diff)
Merge #2565
2565: Fixed syntax highlighting not refreshing on windows. r=matklad a=omerbenamram I was encoutering the same probelm described in #1690. It seems that events initiated by the frontend with `rust-analyzer/decorationsRequest` would go through. So whenever a user switches tabs, highlighting will update. However, when decorations are initiated by a notification with `rust-analyzer/publishDecorations`, it would fail on this check here https://github.com/rust-analyzer/rust-analyzer/blob/6cbd8a4a4bbca8a7656df9f3ef849acebbf9ef9b/editors/code/src/notifications/publish_decorations.ts#L15 (`targetEditor` will always be `undefined`). This is because it's trying to match the uri `rust-analyzer` sends (which uses an uppercase drive letter) to the uri provided at `editor.document.uri.toString()`, which is both escaped (uses `%3a` for `:`), and uses a lowercase letter drive. Aparrently this was an issue for some other extensions aswell - https://github.com/Microsoft/vscode/issues/68325. But this is the defined behavior - https://github.com/microsoft/vscode/blob/c110d84460b3e45842a8fe753562341003595e1d/src/vs/vscode.d.ts#L1304 This fix is only relevant for windows. I've opted for a server-side fix, since rust will always return uppercase letters for drives, there seems to be no other easy solution than manipulating the Url string before sending it to the frontend. Closes #1690. Co-authored-by: Omer Ben-Amram <[email protected]>
Diffstat (limited to 'crates/ra_hir/src/from_id.rs')
0 files changed, 0 insertions, 0 deletions