summaryrefslogtreecommitdiffstats
path: root/src/pattern.go
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2017-08-10 23:59:40 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2017-08-10 23:59:52 +0900
commit02a7b96f33036192abb5816b5860e546e6b4e64e (patch)
treeac1e1ecbbd08db5c7df0979ca08209437857b35d /src/pattern.go
parente55e029ae8002c46e117d55bdfcc725b69bc21ef (diff)
Treat $ as proper search query
When $ is the leading character in a query, it's probably not meant to be an anchor.
Diffstat (limited to 'src/pattern.go')
-rw-r--r--src/pattern.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pattern.go b/src/pattern.go
index 35a2f33c..8029fd0c 100644
--- a/src/pattern.go
+++ b/src/pattern.go
@@ -175,7 +175,7 @@ func parseTerms(fuzzy bool, caseMode Case, normalize bool, str string) []termSet
text = text[1:]
}
- if strings.HasSuffix(text, "$") {
+ if text != "$" && strings.HasSuffix(text, "$") {
if strings.HasSuffix(text, "\\$") {
text = text[:len(text)-2] + "$"
} else {