mirror of
https://github.com/junegunn/fzf.git
synced 2025-08-24 17:03:49 -07:00
Remove trailing whitespaces when using --with-nth
This commit is contained in:
@@ -142,6 +142,11 @@ func (chars *Chars) TrailingWhitespaces() int {
|
||||
return whitespaces
|
||||
}
|
||||
|
||||
func (chars *Chars) TrimTrailingWhitespaces() {
|
||||
whitespaces := chars.TrailingWhitespaces()
|
||||
chars.slice = chars.slice[0 : len(chars.slice)-whitespaces]
|
||||
}
|
||||
|
||||
func (chars *Chars) ToString() string {
|
||||
if runes := chars.optionalRunes(); runes != nil {
|
||||
return string(runes)
|
||||
|
Reference in New Issue
Block a user