m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-16 15:23:48 -05:00

Make --accept-nth and --with-nth support templates

This commit is contained in:
Junegunn Choi
2025-02-12 20:15:04 +09:00
parent 378137d34a
commit 84e2262ad6
9 changed files with 158 additions and 48 deletions

View File

@@ -184,11 +184,6 @@ 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) TrimSuffix(runes []rune) {
lastIdx := len(chars.slice)
firstIdx := lastIdx - len(runes)