diff options
author | Daniel Xu <dxu@dxuuu.xyz> | 2019-08-19 22:10:48 -0700 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2019-08-20 16:03:37 +0900 |
commit | 6fcc047c3116b6ef59cae39b3beb9e815f9b62a6 (patch) | |
tree | bbe1386eae936e6d114f78ada7f23e4cba33ee93 /widgets | |
parent | 334ca89bea38132252d092ad6066af100768eff7 (diff) | |
download | aerc-6fcc047c3116b6ef59cae39b3beb9e815f9b62a6.tar.gz |
Only compile regex portion of folder filter
The code was trying to compile the `~` as well. In this case, it was trying to match a literal `~` to the front of the supplied regex. Fixes: 334ca89bea381 ("folder filter: only assume regex if filter is ~fmt") Signed-off-by: Daniel Xu <dxu@dxuuu.xyz>
Diffstat (limited to 'widgets')
-rw-r--r-- | widgets/dirlist.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/widgets/dirlist.go b/widgets/dirlist.go index 68ba61c..6214c8e 100644 --- a/widgets/dirlist.go +++ b/widgets/dirlist.go @@ -165,7 +165,7 @@ func folderMatches(folder string, pattern string) bool { return false } if pattern[0] == '~' { - r, err := regexp.Compile(pattern) + r, err := regexp.Compile(pattern[1:]) if err != nil { return false } |