mirror of
https://github.com/junegunn/fzf.git
synced 2025-08-16 04:33:51 -07:00
Fix --with-nth performance; use simpler regular expression
Related #317
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
package fzf
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"regexp"
|
||||
@@ -284,10 +283,6 @@ func delimiterRegexp(str string) Delimiter {
|
||||
}
|
||||
|
||||
// 3. Pattern as regular expression. Slow.
|
||||
rx, e = regexp.Compile(fmt.Sprintf("(?:.*?%s)|(?:.+?$)", str))
|
||||
if e != nil {
|
||||
errorExit("invalid regular expression: " + e.Error())
|
||||
}
|
||||
return Delimiter{regex: rx}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user