Fix Markdown Scroll Sync For Windows Path Casing (#20064)

**Bug**
Scroll sync not working for some users on windows

**Fix**
Root cause seems to be that windows drive/path cases can sometimes differ between preview and editor document. Adds a equality check based on `fsPath` as well
This commit is contained in:
Matt Bierner
2017-02-06 10:19:45 -08:00
committed by GitHub
parent 7363c243f2
commit 4e91a74c6f
3 changed files with 5 additions and 5 deletions

View File

@@ -117,7 +117,7 @@ export class MDDocumentContentProvider implements vscode.TextDocumentContentProv
${body}
<script>
window.initialData = {
source: "${encodeURIComponent(sourceUri.scheme + '://' + sourceUri.path)}",
source: "${encodeURIComponent(sourceUri.toString(true))}",
line: ${initialLine},
scrollPreviewWithEditorSelection: ${!!markdownConfig.get('preview.scrollPreviewWithEditorSelection', true)},
scrollEditorWithPreview: ${!!markdownConfig.get('preview.scrollEditorWithPreview', true)},