Skip to content

Commit 09fdbff

Browse files
fix: don't apply charset on document opening (#466)
1 parent 164e532 commit 09fdbff

2 files changed

Lines changed: 2 additions & 6 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ for more information on the multiple ways of installing VSCode extensions.
4343
- `end_of_line` (on save)
4444
- `insert_final_newline` (on save)
4545
- `trim_trailing_whitespace` (on save)
46-
- `charset` (on open/after save)
46+
- `charset`
4747

4848
## How it works
4949

src/DocumentWatcher.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export default class DocumentWatcher {
7676
if (path.basename(doc.fileName) === '.editorconfig') {
7777
this.log('.editorconfig file saved.')
7878
}
79-
// in case document was dirty on open/text editor change
79+
// in case document was dirty on text editor change
8080
this.handleDocumentEncoding(doc)
8181
}),
8282
)
@@ -91,10 +91,6 @@ export default class DocumentWatcher {
9191
}),
9292
)
9393

94-
subscriptions.push(
95-
workspace.onDidOpenTextDocument(this.handleDocumentEncoding),
96-
)
97-
9894
this.disposable = Disposable.from.apply(this, subscriptions)
9995
this.log('Document watcher initialized')
10096
}

0 commit comments

Comments
 (0)