if len(description) > 0:
let lines = description.get("").splitLines(getWindowSize().width - padding)
for line in lines:
echo(' '.repeat(padding), line)
I didn't do any searching for other areas where an empty string would cause issues, and as I don't know nim in the slightest, there is probably a more elegant solution.
This package in the AUR has a 0 length description. It causes pakku to crash here: https://github.com/kitsunyan/pakku/blob/master/src/format.nim#L152 I tested a change off of version 0.14 where I just didn't print anything if the description is empty:
output after change:
I didn't do any searching for other areas where an empty string would cause issues, and as I don't know nim in the slightest, there is probably a more elegant solution.