summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorDaniel Xu <dxu@dxuuu.xyz>2019-08-19 22:10:48 -0700
committerDrew DeVault <sir@cmpwn.com>2019-08-20 16:03:37 +0900
commit6fcc047c3116b6ef59cae39b3beb9e815f9b62a6 (patch)
treebbe1386eae936e6d114f78ada7f23e4cba33ee93
parent334ca89bea38132252d092ad6066af100768eff7 (diff)
downloadaerc-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>
-rw-r--r--widgets/dirlist.go2
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
 		}
r Kartik K. Agaram <vc@akkartik.com> 2016-01-19 23:18:03 -0800 committer Kartik K. Agaram <vc@akkartik.com> 2016-01-19 23:18:03 -0800 2576 - distinguish allocated addresses from others' href='/akkartik/mu/commit/edit/008-sandbox-test.mu?h=main&id=455fbac64f101b05f7eaca89b84470569e4df3fd'>455fbac6 ^
a90faae9 ^


455fbac6 ^

a90faae9 ^



3151fb23 ^
a90faae9 ^









455fbac6 ^
a90faae9 ^













bbe0801a ^
455fbac6 ^
a90faae9 ^




3151fb23 ^
a90faae9 ^




c1585c88 ^
a90faae9 ^







455fbac6 ^
a90faae9 ^







c1585c88 ^
a90faae9 ^






fa94f4d9 ^
a90faae9 ^




455fbac6 ^
a90faae9 ^





455fbac6 ^
a90faae9 ^





aaf61a53 ^
a90faae9 ^





455fbac6 ^
a90faae9 ^
b0403c18 ^
a90faae9 ^
455fbac6 ^
a90faae9 ^




455fbac6 ^
a90faae9 ^














455fbac6 ^
a90faae9 ^
b0403c18 ^
455fbac6 ^
a90faae9 ^






455fbac6 ^
a90faae9 ^
a90faae9 ^





455fbac6 ^
a90faae9 ^
c193f232 ^
a90faae9 ^

3f7eed6c ^
a90faae9 ^


3f7eed6c ^
a90faae9 ^



1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172