From 02a7b96f33036192abb5816b5860e546e6b4e64e Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Thu, 10 Aug 2017 23:59:40 +0900 Subject: Treat $ as proper search query When $ is the leading character in a query, it's probably not meant to be an anchor. --- src/pattern.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/pattern.go') 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 { -- cgit v1.2.3