Skip to content

Commit

Permalink
Improve error handling for conflicts with "haxe.enableExtendedIndenta…
Browse files Browse the repository at this point in the history
…tion"

see #410
  • Loading branch information
Gama11 committed Jun 10, 2020
1 parent a6232e1 commit e544bd0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
### 2.20.3 (to be released)

**Changes and Improvements:**

- improved error handling for conflicts with `"haxe.enableExtendedIndentation"` ([#410](https://github.com/vshaxe/vshaxe/issues/410))

### 2.20.2 (June 7, 2020)

**Changes and Improvements:**
Expand Down
9 changes: 7 additions & 2 deletions src/vshaxe/AutoIndentation.hx
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,13 @@ class AutoIndentation {
return;
}
if (enabled) {
typeDisposable = commands.registerCommand("type", type);
context.subscriptions.push(typeDisposable);
try {
typeDisposable = commands.registerCommand("type", type);
context.subscriptions.push(typeDisposable);
} catch (e) {
window.showErrorMessage("Failed to register the 'type' command needed for the \"haxe.enableExtendedIndentation\" setting"
+ " - there is probably a conflict with another extension such as Vim.");
}
} else {
if (typeDisposable != null) {
typeDisposable.dispose();
Expand Down

0 comments on commit e544bd0

Please sign in to comment.