Invalid display of unicode pager search results #90

Open
opened 1 year ago by epilys · 0 comments
epilys commented 1 year ago
Owner

Search in melib/src/text_processing/search.rs:58 returns position of starting grapheme of match in string instead of starting column of match. So, if string contains graphemes of more than bytes the match position will be displayed wrong.

Drawing match positions in pager is done here src/components/utilities/pager.rs:343

Search in [`melib/src/text_processing/search.rs:58`](https://git.meli.delivery/meli/meli/src/commit/7db32ff1b382bcdd562909855893dd4252d2e41e/melib/src/text_processing/search.rs#L58) returns position of starting grapheme of match in string instead of starting column of match. So, if string contains graphemes of more than bytes the match position will be displayed wrong. Drawing match positions in pager [is done here `src/components/utilities/pager.rs:343`](https://git.meli.delivery/meli/meli/src/commit/7db32ff1b382bcdd562909855893dd4252d2e41e/src/components/utilities/pager.rs#L343)
epilys added the
bug
easy
labels 1 year ago
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.