-
Notifications
You must be signed in to change notification settings - Fork 621
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add prefix matching method feature #1237
Conversation
Codecov Report
@@ Coverage Diff @@
## next #1237 +/- ##
==========================================
- Coverage 33.24% 33.21% -0.04%
==========================================
Files 42 42
Lines 11832 11844 +12
==========================================
Hits 3934 3934
- Misses 7898 7910 +12
Continue to review full report at Codecov.
|
source/helper.c
Outdated
g_string_free(str, FALSE); | ||
return retv; | ||
|
||
return g_strconcat("\\b", g_regex_escape_string(input, -1), NULL); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a memory leak.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, not familiar with C, made a fix.
thanks. |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
With the normal matching method, most of the time, there are too many results, which means more key press is needed to get what I want. With the fuzzy matching method, even more results!
So I made this prefix matching method, which can quickly narrow down the query results, help me to get the target result as less key press as possible.
Of course, add a '\b' before each keyword with regex matching method can also do the work, but apparently I will not likely to type extra same keys before each keyword.
Hope it useful for others.