reveal and expand comments

This commit is contained in:
Peng Lyu
2018-04-23 11:31:05 -07:00
parent 5d5681d6b2
commit 6889469054
3 changed files with 32 additions and 7 deletions

View File

@@ -104,7 +104,10 @@ export class MainThreadComments extends Disposable implements MainThreadComments
getFocusedEditor(): ICodeEditor {
let editor = this._codeEditorService.getFocusedCodeEditor();
if (!editor) {
editor = this._workbenchEditorService.getActiveEditor().getControl() as ICodeEditor;
let activeEditor = this._workbenchEditorService.getActiveEditor();
if (activeEditor) {
editor = activeEditor.getControl() as ICodeEditor;
}
}
return editor;