Skip to content

Commit 0adc1c3

Browse files
authored
Fix documenttype for OpenedDocument event (#1121)
The `OpenedDocument` event includes either `Qsharp` or `JupyterCell` for its document type, but the query was causing all documents to be treated as `Qsharp`. Swapping the ordering so we can correctly distinguish cells for this event.
1 parent 9d4168c commit 0adc1c3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

vscode/src/extension.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,10 @@ function registerDocumentUpdateHandlers(languageService: ILanguageService) {
105105
const subscriptions = [];
106106
subscriptions.push(
107107
vscode.workspace.onDidOpenTextDocument((document) => {
108-
const documentType = isQsharpDocument(document)
109-
? QsharpDocumentType.Qsharp
110-
: isQsharpNotebookCell(document)
108+
const documentType = isQsharpNotebookCell(document)
111109
? QsharpDocumentType.JupyterCell
110+
: isQsharpDocument(document)
111+
? QsharpDocumentType.Qsharp
112112
: QsharpDocumentType.Other;
113113
if (documentType !== QsharpDocumentType.Other) {
114114
sendTelemetryEvent(

0 commit comments

Comments
 (0)