helix icon indicating copy to clipboard operation
helix copied to clipboard

refactor search functions

Open thaqibm opened this issue 3 years ago • 2 comments

Refactored the search functions in helix-core. Possible improvements: Can implement a bidirectional search function with an enum for direction.

thaqibm avatar Oct 11 '22 06:10 thaqibm

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

the-mikedavis avatar Oct 12 '22 00:10 the-mikedavis

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.

thaqibm avatar Oct 12 '22 00:10 thaqibm

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

the-mikedavis avatar Feb 10 '24 20:02 the-mikedavis