Skip to content
Myr

Fix string truncation

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Junegunn Choi · committed by Junegunn Choi · parent e70a2a5 · Browse files · 1 file+6 added−6 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+6 added−6 removed

  • other:+6 added−6 removed

1 file+6 added−6 removed

modified:src/terminal.go+6 added-6 removed
331 unmodified lines
332 b, e := offset.offset[0], offset.offset[1]333 b += 2 - diff334 e += 2 - diff335 b = util.Max32(b, 2)336 if b < e {337 offsets[idx].offset[0] = b338 offsets[idx].offset[1] = e336 offsets[idx].offset[0] = b337 offsets[idx].offset[1] = util.Max32(b, e)339 }338 }339 text = append([]rune(".."), text...)340 }341 }
8 unmodified lines
350351 substr, prefixWidth = processTabs(text[index:b], prefixWidth)352 C.CPrint(col1, bold, substr)353354 if b < e {356 substr, prefixWidth = processTabs(text[b:e], prefixWidth)357 C.CPrint(offset.color, bold, substr)355 substr, prefixWidth = processTabs(text[b:e], prefixWidth)356 C.CPrint(offset.color, bold, substr)357 }358359 index = e360 if index >= maxOffset {361 break
351 unmodified lines