diff --git a/apps/remix-ide/src/app/components/side-panel.js b/apps/remix-ide/src/app/components/side-panel.js index 9df8dacb06..0cc09d84d4 100644 --- a/apps/remix-ide/src/app/components/side-panel.js +++ b/apps/remix-ide/src/app/components/side-panel.js @@ -113,6 +113,7 @@ export class SidePanel extends AbstractPanel { async showContent (name) { super.showContent(name) this.renderHeader() + this.emit('focusChanged', name) } /** The header of the side panel */ diff --git a/apps/remix-ide/src/app/editor/SourceHighlighters.js b/apps/remix-ide/src/app/editor/SourceHighlighters.js index 1cb05c8f3d..f5f939cb24 100644 --- a/apps/remix-ide/src/app/editor/SourceHighlighters.js +++ b/apps/remix-ide/src/app/editor/SourceHighlighters.js @@ -30,8 +30,9 @@ class SourceHighlighters { // eslint-disable-next-line try { if (!this.highlighters[from]) return - const sourceHighlight = new SourceHighlighter() + let sourceHighlight for (const index in this.highlighters[from]) { + sourceHighlight = new SourceHighlighter() sourceHighlight.currentSourceLocationFromfileName( this.highlighters[from][index].position, this.highlighters[from][index].source,