mirror of
https://github.com/junegunn/fzf.git
synced 2025-08-18 14:03:50 -07:00
Always prepend ANSI reset code before re-assembling tokens
This commit is contained in:
@@ -172,11 +172,11 @@ func (chars *Chars) CopyRunes(dest []rune) {
|
||||
return
|
||||
}
|
||||
|
||||
func (chars *Chars) Wrap(prefix string, suffix string) {
|
||||
func (chars *Chars) Prepend(prefix string) {
|
||||
if runes := chars.optionalRunes(); runes != nil {
|
||||
runes = append(append([]rune(prefix), runes...), []rune(suffix)...)
|
||||
runes = append([]rune(prefix), runes...)
|
||||
chars.slice = *(*[]byte)(unsafe.Pointer(&runes))
|
||||
} else {
|
||||
chars.slice = append(append([]byte(prefix), chars.slice...), []byte(suffix)...)
|
||||
chars.slice = append([]byte(prefix), chars.slice...)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user