ls no longer prints lingering newline

This commit is contained in:
Olivier Gagnon 2021-05-17 21:58:11 -04:00
parent 188dcbad89
commit b69a262faf
2 changed files with 14 additions and 9 deletions

@ -264,5 +264,7 @@ export const CONSTANTS: IMap<any> = {
* 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.
`,
}

@ -1781,19 +1781,22 @@ let Terminal = {
i--;
postContent(row, config);
}
if(segments.length > 0) {
postElement(<br />);
}
}
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(<br />);
postSegments(groups[i].segments, groups[i].config);
}
},
executeMemCommand: function(commandArray) {