Skip to content
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

Merged
merged 4 commits into from
May 29, 2021
Merged

Conversation

unisgn
Copy link
Contributor

@unisgn unisgn commented Dec 17, 2020

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.

@codecov-io
Copy link

codecov-io commented Dec 18, 2020

Codecov Report

Merging #1237 (0e2070d) into next (11b677b) will decrease coverage by 0.03%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            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     
Impacted Files Coverage Δ
source/helper.c 51.46% <0.00%> (-0.88%) ⬇️
source/xrmoptions.c 15.63% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 11b677b...0e2070d. Read the comment docs.

source/helper.c Outdated
g_string_free(str, FALSE);
return retv;

return g_strconcat("\\b", g_regex_escape_string(input, -1), NULL);
Copy link
Collaborator

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.

Copy link
Contributor Author

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.

@DaveDavenport DaveDavenport merged commit c3e70d4 into davatorium:next May 29, 2021
@DaveDavenport
Copy link
Collaborator

thanks.

@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants