mirror of
https://github.com/junegunn/fzf.git
synced 2026-10-08 13:05:22 +08:00
Remove trailing whitespaces when using --with-nth
This commit is contained in:
2 files changed
+6
No files matched your search
@@ -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