diff --git a/src/project.ts b/src/project.ts index 9e14c1b1..c0422098 100644 --- a/src/project.ts +++ b/src/project.ts @@ -293,9 +293,9 @@ export class CodeProject { this.listings = data.listings; for (var lstname in this.listings) { var lst = this.listings[lstname]; - if (lst.lines && lst.text) + if (lst.lines) lst.sourcefile = new SourceFile(lst.lines, lst.text); - if (lst.asmlines && lst.text) + if (lst.asmlines) lst.assemblyfile = new SourceFile(lst.asmlines, lst.text); } } diff --git a/src/ui.ts b/src/ui.ts index 092f095e..35a3e1a2 100644 --- a/src/ui.ts +++ b/src/ui.ts @@ -173,8 +173,8 @@ function refreshWindowList() { if (listings) { for (var lstfn in listings) { var lst = listings[lstfn]; - // TODO: add assembly listings? (lines, macrolines, sourcefile) - if (lst.assemblyfile || lst.sourcefile) { + // add listing if source/assembly file exists and has text + if ((lst.assemblyfile && lst.assemblyfile.text) || (lst.sourcefile && lst.sourcefile.text)) { addWindowItem(lstfn, getFilenameForPath(lstfn), (path) => { return new Views.ListingView(path); });