corrected SourceHighlighter input

pull/526/head
LianaHus 4 years ago
parent 08cddf6a9c
commit 95c48637b1
  1. 4
      apps/remix-ide/src/app/editor/SourceHighlighters.js
  2. 9
      apps/remix-ide/src/app/editor/sourceHighlighter.js

@ -32,8 +32,8 @@ class SourceHighlighters {
for (const index in this.highlighters[from]) { for (const index in this.highlighters[from]) {
sourceHighlight.currentSourceLocationFromfileName( sourceHighlight.currentSourceLocationFromfileName(
this.highlighters[from][index].position, this.highlighters[from][index].position,
this.highlighters[from][index].filePath, this.highlighters[from][index].source,
this.highlighters[from][index].hexColor this.highlighters[from][index].style
) )
this.highlighters[from][index] = sourceHighlight this.highlighters[from][index] = sourceHighlight
} }

@ -39,7 +39,8 @@ class SourceHighlighter {
this.source = null this.source = null
if (lineColumnPos) { if (lineColumnPos) {
this.source = filePath this.source = filePath
if (!this.source) this.source = this._deps.fileManager.currentFile() this.style = style || 'var(--info)'
//if (!this.source) this.source = this._deps.fileManager.currentFile()
if (this._deps.fileManager.currentFile() !== this.source) { if (this._deps.fileManager.currentFile() !== this.source) {
await this._deps.fileManager.open(this.source) await this._deps.fileManager.open(this.source)
this.source = this._deps.fileManager.currentFile() this.source = this._deps.fileManager.currentFile()
@ -50,16 +51,16 @@ class SourceHighlighter {
position:absolute; position:absolute;
z-index:20; z-index:20;
opacity: 0.3; opacity: 0.3;
background-color: ${style || 'var(--info)'}; background-color: ${this.style};
} }
.highlightcode_fullLine { .highlightcode_fullLine {
position:absolute; position:absolute;
z-index:20; z-index:20;
opacity: 0.5; opacity: 0.5;
background-color: ${style || 'var(--info)'}; background-color: ${this.style};
} }
.customBackgroundColor { .customBackgroundColor {
background-color: ${style || 'var(--info)'}; background-color: ${this.style};
} }
` `

Loading…
Cancel
Save