Skip to content

Commit

Permalink
Also show interpreter in status bar when a Python related output chan…
Browse files Browse the repository at this point in the history
…nel is opened (#21894)

Closes #21890
  • Loading branch information
Kartik Raj authored Aug 29, 2023
1 parent 1204011 commit 782d5b1
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/client/interpreter/interpreterService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import {
PythonEnvironmentsChangedEvent,
} from './contracts';
import { traceError, traceLog } from '../logging';
import { Commands, PYTHON_LANGUAGE } from '../common/constants';
import { Commands, PVSC_EXTENSION_ID, PYTHON_LANGUAGE } from '../common/constants';
import { reportActiveInterpreterChanged } from '../environmentApi';
import { IPythonExecutionFactory } from '../common/process/types';
import { Interpreters } from '../common/utils/localize';
Expand Down Expand Up @@ -138,7 +138,12 @@ export class InterpreterService implements Disposable, IInterpreterService {
return false;
}
const document = this.docManager.activeTextEditor?.document;
if (document?.fileName.endsWith('settings.json')) {
// Output channel for MS Python related extensions. These contain "ms-python" in their ID.
const pythonOutputChannelPattern = PVSC_EXTENSION_ID.split('.')[0];
if (
document?.fileName.endsWith('settings.json') ||
document?.fileName.includes(pythonOutputChannelPattern)
) {
return false;
}
return document?.languageId !== PYTHON_LANGUAGE;
Expand Down

0 comments on commit 782d5b1

Please sign in to comment.