Use fspath for reveal line to fix drive letter case differences

This commit is contained in:
Matt Bierner 2018-02-26 13:38:18 -08:00
parent ef3b4ddc6f
commit 6f5f757479

View file

@ -12,7 +12,7 @@ export class RevealLineCommand implements Command {
public readonly id = '_markdown.revealLine';
public constructor(
private logger: Logger
private readonly logger: Logger
) { }
public execute(uri: string, line: number) {
@ -20,7 +20,7 @@ export class RevealLineCommand implements Command {
this.logger.log('revealLine', { uri, sourceUri: sourceUri.toString(), line });
vscode.window.visibleTextEditors
.filter(editor => isMarkdownFile(editor.document) && editor.document.uri.toString() === sourceUri.toString())
.filter(editor => isMarkdownFile(editor.document) && editor.document.uri.fsPath === sourceUri.fsPath)
.forEach(editor => {
const sourceLine = Math.floor(line);
const fraction = line - sourceLine;