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

Search stops working when match jumps over an Unicode symbols #88

Closed
hovsater opened this issue Jun 3, 2021 · 3 comments
Closed

Search stops working when match jumps over an Unicode symbols #88

hovsater opened this issue Jun 3, 2021 · 3 comments

Comments

@hovsater
Copy link
Contributor

hovsater commented Jun 3, 2021

When searching using /, going to the next match using n stops working when you've passed the character .

Environment

  • hx v0.0.9
  • helix-term 0.1.0

Steps to reproduce

Given the following file:

test:
key
⽆
key
key
  1. Put your cursor at the first line test:. Search for key using /key
  2. Press n for next match
  3. Press n for next match (does not work)
@hovsater hovsater changed the title Search stops working when match jumps over some Unicode symbols Search stops working when match jumps over a Unicode symbols Jun 3, 2021
@hovsater hovsater changed the title Search stops working when match jumps over a Unicode symbols Search stops working when match jumps over an Unicode symbols Jun 3, 2021
kirawi added a commit to kirawi/helix that referenced this issue Jun 4, 2021
@archseer
Copy link
Member

archseer commented Jun 5, 2021

Fixed by #121

@archseer archseer closed this as completed Jun 5, 2021
@kirawi kirawi mentioned this issue Jun 6, 2021
@kirawi
Copy link
Member

kirawi commented Jun 8, 2021

One clue I found is here in helix-term/src/commands.rs:
let head = end - 1;

If it's offset by the number of bytes in each unicode character (starting from 0), it works just fine for that number of unicode characters. No idea what it is caused by though.

@pickfire
Copy link
Contributor

pickfire commented Jun 8, 2021

Not properly fixed. Reopening.

@pickfire pickfire reopened this Jun 8, 2021
kirawi added a commit to kirawi/helix that referenced this issue Jun 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants