-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmatcher.txt
88 lines (69 loc) · 1.31 KB
/
matcher.txt
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
matcher / filter
sidebar struct
x
y
z
---
Name
Total
New
Flagged
---
filter info
filter on sidebar name
Key: "filter-sidebar-start"
Prompt:
passed a list of (filter_info*)
user types 'a'
pass (list, string, flags) -> matcher
matcher returns 'n' matches
callback to display (list, string, flags)
allow display to do highlighting?
would need to match algorithm
put match info in filter_info
=> highlight
fuzzy = chars: 1,3-4,7-12
simple = 3-6
matcher
∀ list
compare
update infos
count results
0 => none
n => some
-1 => error
matching algorithm
compare string
fuzzy
index number
regex
flags:
case sensitive
callback
change-became-longer
change-became-shorter
change-cleared
exit
filter_info
offset to string (filter field)
visible?
old visible (to help client)
or char *rendered_line
for whole line matching
options
default hide non-matching
highlight matching chars
algo: text, regex, index, fuzzy
flags: case sensitive
matcher
extend to index, pager, etc
works with a set of numbers, [0,n-1]
callback to test whether item 'i' matches?
callback to redraw panel
callback needs library fuzzy match
xyz -> x.*y.*z regex
matcher options
hide non-matches (squash spaces)
grey out non-matches
call the matcher *live* limit?
must still be able to move the cursor/select at any time