Closed zqqw closed 4 years ago
This seems to fix it, although it isn't well tested yet so I'll push it later when I have had a chance to look at it more, but sometimes "text" is empty as there is no description and runeOffset doesn't like this.
--- a/src/format.nim
+++ b/src/format.nim
@@ -83,7 +83,9 @@ proc splitLines(text: string, lineSize: int, lines: seq[string] = @[]): seq[stri
if not addBreaks:
lines & text
else:
- let offset = text.runeOffset(lineSize)
+ var offset : int = -1
+ if text.len() != 0:
+ offset = text.runeOffset(lineSize)
if offset < 0:
lines & text
else:
@@ -309,7 +311,7 @@ proc printProgressFull*(bar: bool, title: string): ((string, float) -> void, ()
var lastProgress = 0f
var averageSpeed = -1f
Closed by Fix -Ss index out of bounds, the container is empty [IndexError] (runeOffset: empty description field) 36e59748983034d5d39293e5d2415e92c14e2a22
Compiling pakku for debug not release:
With this build, many searches work but some fail, like "linux" or "steam". No problems updating, installing or removing packages so far.