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. * Deleting a file without extension now returns an appropriate error message.
* Fixed an issue where bladeburner would miscalculate the cost of hospitalization. * Fixed an issue where bladeburner would miscalculate the cost of hospitalization.
* It is now possible to suppress bladeburner "action stopped" popup. * 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--; i--;
postContent(row, config); postContent(row, config);
} }
if(segments.length > 0) {
postElement(<br />);
}
} }
const config = { color: "#0000FF" }; const config = { color: "#0000FF" };
postSegments(folders, config); const groups = [
postSegments(allMessages); {segments: folders, config: config},
postSegments(allTextFiles); {segments: allMessages},
postSegments(allPrograms); {segments: allTextFiles},
postSegments(allContracts); {segments: allPrograms},
postSegments(allScripts); {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) { executeMemCommand: function(commandArray) {