helix
helix copied to clipboard
refactor search functions
Refactored the search functions in helix-core.
Possible improvements: Can implement a bidirectional search function with an enum for direction.
Is there a function change other than find_nth_prev taking a CharMatcher? The original for + loop is nice because it doesn't need an extra count variable
I found it a bit hard to figure out the intentions of the for + loop. Also noticed the function signature was different while refactoring so I added it.
I prefer the current for + loop so I will close this out. In general we avoid refactors / "clean up" changes since they confuse git blame and can cause unnecessary conflicts with other PRs