mirror of
https://github.com/mum4k/termdash.git
synced 2025-04-28 13:48:51 +08:00
Comment from @chipmunkie.
This commit is contained in:
parent
870e1bda00
commit
b98948326b
@ -132,7 +132,7 @@ func TrimText(text string, maxCells int, om OverrunMode) (string, error) {
|
|||||||
switch {
|
switch {
|
||||||
case om == OverrunModeTrim:
|
case om == OverrunModeTrim:
|
||||||
// Only write the rune if it still fits, i.e. don't cut
|
// Only write the rune if it still fits, i.e. don't cut
|
||||||
// full-width runes in halt.
|
// full-width runes in half.
|
||||||
if cur+rw == maxCells {
|
if cur+rw == maxCells {
|
||||||
b.WriteRune(r)
|
b.WriteRune(r)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user