syntax highlighting fixed

pull/478/head
aniket-engg 4 years ago committed by Aniket
parent e318740639
commit 7f084a400d
  1. 2
      apps/remix-ide/src/app/tabs/debugger/debuggerUI/VmDebugger.js
  2. 4
      apps/remix-ide/src/lib/offsetToLineColumnConverter.js

@ -38,7 +38,7 @@ function VmDebugger (vmDebuggerLogic) {
this.functionPanel = new FunctionPanel()
this.vmDebuggerLogic.event.register('functionsStackUpdate', (stack) => {
if (stack === null) return
if (stack === null || stack.length === 0) return
let functions = []
for (let func of stack) {
functions.push(func.functionDefinition.name + '(' + func.inputs.join(', ') + ')')

@ -20,8 +20,8 @@ export class OffsetToLineColumnConverter extends Plugin {
offsetToLineColumn (rawLocation, file, sources, asts) {
if (!this.lineBreakPositionsByContent[file]) {
const sourcesArray = Object.keys(sources)
if (!asts && file === 0 && sourcesArray.length === 1) {
// if we don't have ast, we process the only one available content
if (!asts || (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)
this.lineBreakPositionsByContent[file] = this.sourceMappingDecoder.getLinebreakPositions(sources[sourcesArray[0]].content)
} else {
for (var filename in asts) {

Loading…
Cancel
Save