Skip to content

Commit

Permalink
We don't need onDidOpenTextDocument() because we have `onDidChangeA…
Browse files Browse the repository at this point in the history
…ctiveTextEditor()`
  • Loading branch information
juliasilge committed Nov 26, 2024
1 parent 8d00a51 commit a3535e0
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions apps/vscode/src/providers/context-keys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,6 @@ export function activateContextKeySetter(
engine: MarkdownEngine
) {

// set context keys when docs are opened
vscode.workspace.onDidOpenTextDocument(
(doc) => {
if (doc === vscode.window.activeTextEditor?.document) {
if (isQuartoDoc(doc)) {
setContextKeys(vscode.window.activeTextEditor, engine);
}
}
},
null,
context.subscriptions
);

// set context keys when active text editor changes
vscode.window.onDidChangeActiveTextEditor(
(editor) => {
Expand Down

0 comments on commit a3535e0

Please sign in to comment.