Add force refresh case for #108670
This commit is contained in:
parent
028848c4e7
commit
f87d1f4609
2 changed files with 3 additions and 3 deletions
|
@ -138,7 +138,7 @@ export function activateEmmetExtension(context: vscode.ExtensionContext) {
|
|||
context.subscriptions.push(vscode.workspace.onDidSaveTextDocument((e) => {
|
||||
const basefileName: string = getPathBaseName(e.fileName);
|
||||
if (basefileName.startsWith('snippets') && basefileName.endsWith('.json')) {
|
||||
updateEmmetExtensionsPath();
|
||||
updateEmmetExtensionsPath(true);
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
|
|
@ -35,12 +35,12 @@ export function getEmmetHelper() {
|
|||
/**
|
||||
* Update Emmet Helper to use user snippets from the extensionsPath setting
|
||||
*/
|
||||
export function updateEmmetExtensionsPath() {
|
||||
export function updateEmmetExtensionsPath(forceRefresh: boolean = false) {
|
||||
if (!_emmetHelper) {
|
||||
return;
|
||||
}
|
||||
let extensionsPath = vscode.workspace.getConfiguration('emmet')['extensionsPath'];
|
||||
if (_currentExtensionsPath !== extensionsPath) {
|
||||
if (forceRefresh || _currentExtensionsPath !== extensionsPath) {
|
||||
_currentExtensionsPath = extensionsPath;
|
||||
if (!vscode.workspace.workspaceFolders || vscode.workspace.workspaceFolders.length === 0) {
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue