if a non- TextEditor pane is selected, focusEditor() is called via atom.workspace.onDidChangeActivePaneItem( in atom-ternjs-manager.js.
I believe this break happened in Release 0.18.0
see this issue for an example of the problem it causes
Here's my patch in atom-ternjs-helper.js
export function focusEditor() {
// const editor = atom.workspace.getActiveTextEditor();
// getActiveTextEditor() will return the last focused textEditor, and re-focus it at the end of this function
const editor = atom.workspace.getActivePaneItem();
// Instead use getActivePaneItem() and isValidEditor() to determine editor validity.
// if (!editor) { // this condition pretty much never met with getActiveTextEditor()
if (!isValidEditor(editor)) {
return;
}
const view = atom.views.getView(editor);
view && view.focus && view.focus();
}
if a non- TextEditor pane is selected, focusEditor() is called via
atom.workspace.onDidChangeActivePaneItem(
inatom-ternjs-manager.js
.I believe this break happened in Release 0.18.0
see this issue for an example of the problem it causes
Here's my patch in
atom-ternjs-helper.js