diff --git a/src/Constants.ts b/src/Constants.ts index 3ed364f04..6682dcfca 100644 --- a/src/Constants.ts +++ b/src/Constants.ts @@ -264,5 +264,7 @@ export const CONSTANTS: IMap = { * Deleting a file without extension now returns an appropriate error message. * Fixed an issue where bladeburner would miscalculate the cost of hospitalization. * It is now possible to suppress bladeburner "action stopped" popup. + * Updated several dependencies (who cares, I know) + * ls no longer prints lingering newline. `, } \ No newline at end of file diff --git a/src/Terminal.jsx b/src/Terminal.jsx index aef1812f3..327348807 100644 --- a/src/Terminal.jsx +++ b/src/Terminal.jsx @@ -1781,19 +1781,22 @@ let Terminal = { i--; postContent(row, config); } - if(segments.length > 0) { - postElement(
); - } } const config = { color: "#0000FF" }; - postSegments(folders, config); - postSegments(allMessages); - postSegments(allTextFiles); - postSegments(allPrograms); - postSegments(allContracts); - postSegments(allScripts); + const groups = [ + {segments: folders, config: config}, + {segments: allMessages}, + {segments: allTextFiles}, + {segments: allPrograms}, + {segments: allContracts}, + {segments: allScripts}, + ].filter((g) => g.segments.length > 0) + for(let i = 0; i < groups.length; i++) { + if(i !== 0) postElement(
); + postSegments(groups[i].segments, groups[i].config); + } }, executeMemCommand: function(commandArray) {