renderLine fine length

This commit is contained in:
2024-09-27 20:51:22 +02:00
parent 5024087358
commit fdbb54a557
+4 -4
View File
@@ -49,15 +49,15 @@ func renderLine(frameLine, line_ string, x int) string {
i := 0 i := 0
v := 0 v := 0
for _, c := range result { for j, c := range result {
if i >= x && v < len(line) { if i+j >= x && v < len(line) {
if c != '\b' && line[v] == '\t' { if c != '\b' && line[v] == '\t' {
result = append(result, ' ') result = append(result, ' ')
} }
result[i] = line[v] result[i+j] = line[v]
v++ v++
} }
if c != '\b' { if c == '\b' {
i++ i++
} }
} }