rust/editors
bors[bot] 4e24b25c66
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 6cbd8a4a4b/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 - c110d84460/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 <omerbenamram@gmail.com>
2019-12-15 16:35:23 +00:00
..
code Merge #2565 2019-12-15 16:35:23 +00:00
emacs Add rust-analyzer-expand-macro function for Emacs 2019-11-20 20:45:25 +01:00