File tree 1 file changed +7
-2
lines changed
src/client/interpreter/display 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,11 @@ import {
14
14
IInterpreterStatusbarVisibilityFilter ,
15
15
} from '../contracts' ;
16
16
17
+ /**
18
+ * Based on https://github.com/microsoft/vscode-python/issues/18040#issuecomment-992567670.
19
+ * This is to ensure the item appears right after the Python language status item.
20
+ */
21
+ const STATUS_BAR_ITEM_PRIORITY = 100.09999 ;
17
22
@injectable ( )
18
23
export class InterpreterDisplay implements IInterpreterDisplay {
19
24
private readonly statusBar : StatusBarItem ;
@@ -36,7 +41,7 @@ export class InterpreterDisplay implements IInterpreterDisplay {
36
41
const application = serviceContainer . get < IApplicationShell > ( IApplicationShell ) ;
37
42
const disposableRegistry = serviceContainer . get < Disposable [ ] > ( IDisposableRegistry ) ;
38
43
39
- this . statusBar = application . createStatusBarItem ( StatusBarAlignment . Right , 100 ) ;
44
+ this . statusBar = application . createStatusBarItem ( StatusBarAlignment . Right , STATUS_BAR_ITEM_PRIORITY ) ;
40
45
this . statusBar . command = 'python.setInterpreter' ;
41
46
disposableRegistry . push ( this . statusBar ) ;
42
47
@@ -83,7 +88,7 @@ export class InterpreterDisplay implements IInterpreterDisplay {
83
88
) ;
84
89
this . interpreterPath = interpreter . path ;
85
90
}
86
- this . statusBar . text = interpreter . displayName ! ;
91
+ this . statusBar . text = interpreter . displayName ! . substring ( 'Python ' . length ) ;
87
92
this . currentlySelectedInterpreterPath = interpreter . path ;
88
93
} else {
89
94
this . statusBar . tooltip = '' ;
You can’t perform that action at this time.
0 commit comments