Reset markdown scroll progress on resource change (#176437)

Reset scroll progress on resource change

Fixes #164071
This commit is contained in:
Matt Bierner 2023-03-07 14:12:46 -08:00 committed by GitHub
parent 7b47a33073
commit 83c4e0f5c4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -28,6 +28,10 @@ const state = {
...getData<any>('data-state')
};
if (originalState.resource !== state.resource) {
state.scrollProgress = undefined;
}
// Make sure to sync VS Code state here
vscode.setState(state);