ilai-deutel / kibi

A text editor in ≤1024 lines of code, written in Rust
Other
1.46k stars 83 forks source link

Find multiple matches on the same line. #279

Closed mtimaN closed 7 months ago

mtimaN commented 9 months ago

I modified find so that it can show multiple matches on the same line.

codecov[bot] commented 9 months ago

Codecov Report

Attention: 14 lines in your changes are missing coverage. Please review.

Comparison is base (f63acb5) 48.70% compared to head (03b802b) 48.56%.

Files Patch % Lines
src/editor.rs 0.00% 14 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #279 +/- ## ========================================== - Coverage 48.70% 48.56% -0.14% ========================================== Files 11 11 Lines 1043 1046 +3 ========================================== Hits 508 508 - Misses 535 538 +3 ``` | [Flag](https://app.codecov.io/gh/ilai-deutel/kibi/pull/279/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Ila%C3%AF+Deutel) | Coverage Δ | | |---|---|---| | [wasm32-wasi](https://app.codecov.io/gh/ilai-deutel/kibi/pull/279/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Ila%C3%AF+Deutel) | `50.00% <0.00%> (-0.15%)` | :arrow_down: | | [x86_64-apple-darwin](https://app.codecov.io/gh/ilai-deutel/kibi/pull/279/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Ila%C3%AF+Deutel) | `50.09% <0.00%> (-0.15%)` | :arrow_down: | | [x86_64-pc-windows-gnu](https://app.codecov.io/gh/ilai-deutel/kibi/pull/279/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Ila%C3%AF+Deutel) | `0.20% <0.00%> (-0.01%)` | :arrow_down: | | [x86_64-unknown-linux-gnu](https://app.codecov.io/gh/ilai-deutel/kibi/pull/279/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Ila%C3%AF+Deutel) | `50.00% <0.00%> (-0.15%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Ila%C3%AF+Deutel#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

mtimaN commented 9 months ago

I fixed the linter error at the expense that parameter names are less suggestive. However I think the comments are insightful enough for the code to be readable.

mtimaN commented 8 months ago

I've realized that my code unfortunately doesn't work for searching backwards on the same line and I can't find a solution that wouldn't break the line count. :(