gum/internal
Christian Rocha b23ebce896 fix: measure runes instead of bytes when truncating
There are a couple of gotchas in LipGlossTruncate:

* len() returns the number of bytes in a string
* slicing a string slices it on a byte level

The fix would normally be to convert the string to a slice of runes and
operate on that new slice:

r := []rune(str)

However, reflow already contains an ansi-aware truncate feature that we
can use instead as a drop-in replacement for the LipGlossTruncate
function.
2023-05-18 11:45:14 -04:00
..
decode chore: fix linting 2022-07-30 18:04:26 -04:00
exit refactor: bubble up ErrAborted 2022-07-30 21:42:48 -04:00
files Add soft & hard linter configs & workflows (#44) 2022-07-30 12:32:59 -04:00
log feat: add stdin input handling and logging helpers 2022-07-07 13:29:10 -04:00
stack docs: document gum table, file, pager 2022-10-07 15:38:48 -04:00
stdin feat(table): gum table for tabular data 2022-10-07 15:38:48 -04:00
utils fix: measure runes instead of bytes when truncating 2023-05-18 11:45:14 -04:00