Commit d48c3dd5 authored by LianaHus's avatar LianaHus Committed by Liana Husikyan

removed caching

parent 15b9b619
...@@ -144,6 +144,7 @@ module.exports = class TestTab extends ViewPlugin { ...@@ -144,6 +144,7 @@ module.exports = class TestTab extends ViewPlugin {
runningTests, runningTests,
runningTests[fileName].content runningTests[fileName].content
) )
this.fileManager.open(fileName)
await this.call('editor', 'discardHighlight') await this.call('editor', 'discardHighlight')
await this.call('editor', 'highlight', location, fileName) await this.call('editor', 'highlight', location, fileName)
} }
......
...@@ -37,14 +37,12 @@ export class OffsetToLineColumnConverter extends Plugin { ...@@ -37,14 +37,12 @@ export class OffsetToLineColumnConverter extends Plugin {
} }
offsetToLineColumnWithContent (rawLocation, file, sources, content) { offsetToLineColumnWithContent (rawLocation, file, sources, content) {
if (!this.lineBreakPositionsByContent[file]) { const sourcesArray = Object.keys(sources)
const sourcesArray = Object.keys(sources) if (content === '' || (file === 0 && sourcesArray.length === 1)) {
if (content === '' || (file === 0 && sourcesArray.length === 1)) { // if we don't have ast, we process the only one available content (applicable also for compiler older than 0.4.12)
// if we don't have ast, we process the only one available content (applicable also for compiler older than 0.4.12) this.lineBreakPositionsByContent[file] = this.sourceMappingDecoder.getLinebreakPositions(sources[sourcesArray[0]].content)
this.lineBreakPositionsByContent[file] = this.sourceMappingDecoder.getLinebreakPositions(sources[sourcesArray[0]].content) } else {
} else { this.lineBreakPositionsByContent[file] = this.sourceMappingDecoder.getLinebreakPositions(content)
this.lineBreakPositionsByContent[file] = this.sourceMappingDecoder.getLinebreakPositions(content)
}
} }
return this.sourceMappingDecoder.convertOffsetToLineColumn(rawLocation, this.lineBreakPositionsByContent[file]) return this.sourceMappingDecoder.convertOffsetToLineColumn(rawLocation, this.lineBreakPositionsByContent[file])
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment