Doc Symbols proper support
This commit is contained in:
@@ -6,7 +6,8 @@ import {
|
||||
Event,
|
||||
EventEmitter,
|
||||
ProviderResult,
|
||||
TextDocument
|
||||
TextDocument,
|
||||
Uri
|
||||
} from "vscode";
|
||||
import {HighlightParams, toVSRange} from './highlight-service';
|
||||
import * as Lsp from 'vscode-languageclient';
|
||||
@@ -22,7 +23,7 @@ export class HighlightCodeLensProvider implements CodeLensProvider {
|
||||
|
||||
handle(highlghtParams: HighlightParams) {
|
||||
if (!deepEqual(this.highlights.get(highlghtParams.doc.uri), highlghtParams)) {
|
||||
this.highlights.set(highlghtParams.doc.uri, highlghtParams);
|
||||
this.highlights.set(Uri.parse(highlghtParams.doc.uri).toString(), highlghtParams);
|
||||
this._onDidChangeCodeLenses.fire();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ export class HighlightService {
|
||||
}
|
||||
|
||||
handle(params : HighlightParams) : void {
|
||||
this.highlights.set(params.doc.uri, params);
|
||||
this.highlights.set(VSCode.Uri.parse(params.doc.uri).toString(), params);
|
||||
this.refresh(params.doc);
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ export class HighlightService {
|
||||
for (let editor of editors) {
|
||||
const activeUri = editor.document.uri.toString();
|
||||
const activeVersion = editor.document.version;
|
||||
if (docId.uri === activeUri && docId.version === activeVersion) {
|
||||
if (VSCode.Uri.parse(docId.uri).toString() === activeUri && docId.version === activeVersion) {
|
||||
//We only update highlights in the active editor for now
|
||||
this.updateHighlightsForEditor(editor);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user