Skip to content
This repository was archived by the owner on Jul 1, 2021. It is now read-only.

Commit 3854200

Browse files
committed
bugfixes
1 parent a2df24b commit 3854200

File tree

4 files changed

+27
-9
lines changed

4 files changed

+27
-9
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Change Log (vs-deploy)
22

3+
## 12.0.3 (December 5th, 2017; bugfixes)
4+
5+
* bugfixes
6+
37
## 12.0.2 (December 1st, 2017; bugfixes)
48

59
* bugfixes

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "vs-deploy",
33
"displayName": "Deploy",
44
"description": "Commands for deploying files of your workspace to a destination.",
5-
"version": "12.0.2",
5+
"version": "12.0.3",
66
"publisher": "mkloubert",
77
"engines": {
88
"vscode": "^1.18.0"

src/deploy.ts

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2365,6 +2365,7 @@ export class Deployer extends Events.EventEmitter implements vscode.Disposable {
23652365
*/
23662366
public onDidChangeActiveTextEditor(editor: vscode.TextEditor) {
23672367
const ME = this;
2368+
const CFG = ME.config;
23682369

23692370
const PREVIOUS_EDITOR = ME._currentTextEditor;
23702371
ME._currentTextEditor = editor;
@@ -2390,7 +2391,7 @@ export class Deployer extends Events.EventEmitter implements vscode.Disposable {
23902391
if (newFolder) {
23912392
deploy_workspace.setWorkspace(newFolder);
23922393

2393-
ME.onDidChangeConfiguration();
2394+
ME.reloadConfiguration();
23942395
}
23952396
}
23962397
catch (e) {
@@ -2399,7 +2400,7 @@ export class Deployer extends Events.EventEmitter implements vscode.Disposable {
23992400
};
24002401

24012402
if (editor) {
2402-
if (deploy_helpers.toBooleanSafe( ME.config.autoSelectWorkspace )) {
2403+
if (CFG && deploy_helpers.toBooleanSafe( CFG.autoSelectWorkspace )) {
24032404
const DOC = editor.document;
24042405

24052406
if (DOC) {
@@ -2465,7 +2466,11 @@ export class Deployer extends Events.EventEmitter implements vscode.Disposable {
24652466
/**
24662467
* Event after configuration changed.
24672468
*/
2468-
public onDidChangeConfiguration() {
2469+
public onDidChangeConfiguration(e: vscode.ConfigurationChangeEvent) {
2470+
if (!e.affectsConfiguration('deploy', vscode.Uri.file(this.settingsFile))) {
2471+
return;
2472+
}
2473+
24692474
this.reloadConfiguration();
24702475
}
24712476

@@ -4107,10 +4112,7 @@ export class Deployer extends Events.EventEmitter implements vscode.Disposable {
41074112
};
41084113

41094114
try {
4110-
const SETTINGS_FILE = Path.join(
4111-
deploy_workspace.getRootPath(),
4112-
'./.vscode/settings.json',
4113-
);
4115+
const SETTINGS_FILE = ME.settingsFile;
41144116

41154117
const LOADED_CFG: deploy_contracts.DeployConfiguration = vscode.workspace.getConfiguration('deploy',
41164118
vscode.Uri.file(SETTINGS_FILE)) || <any>{};
@@ -4780,6 +4782,18 @@ export class Deployer extends Events.EventEmitter implements vscode.Disposable {
47804782
return deploy_values.replaceWithValues(this.getValues(), val);
47814783
}
47824784

4785+
/**
4786+
* Gets the underlying settings file.
4787+
*/
4788+
public get settingsFile() {
4789+
return Path.resolve(
4790+
Path.join(
4791+
deploy_workspace.getRootPath(),
4792+
'./.vscode/settings.json'
4793+
)
4794+
);
4795+
}
4796+
47834797
/**
47844798
* Set ups the file system watcher.
47854799
*/

src/extension.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ export function activate(context: vscode.ExtensionContext) {
233233
const FOLDER = await deploy_workspace.selectWorkspace();
234234
if (FOLDER) {
235235
await Promise.resolve(
236-
deployer.onDidChangeConfiguration()
236+
deployer.reloadConfiguration()
237237
);
238238
}
239239
}

0 commit comments

Comments
 (0)