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

swiper-isearch candidate fontification with char-folding #2124

Closed
gusbrs opened this issue Jul 7, 2019 · 2 comments
Closed

swiper-isearch candidate fontification with char-folding #2124

gusbrs opened this issue Jul 7, 2019 · 2 comments

Comments

@gusbrs
Copy link
Contributor

gusbrs commented Jul 7, 2019

swiper-isearch was recently improved to honor char-folding in its searches (#2095). While the search works nicely, the fontification of candidates when char-folding occurs is not done in the buffer. (Sorry to have missed that when I tested it then.)

Steps to reproduce:

Start emacs -Q.

Run M-x package-initialize RET.

Start M-x ivy-mode RET

Eval (setq search-default-mode #'char-fold-to-regexp)

Consider a buffer with the following content:

Foo bar báz foo bâr bãz foó Bar Baz

And search for either "foo", "bar" or "baz". Notice the candidate fontification occurs in the minibuffer for all candidates, but not in the buffer itself, where it works when no char-folding is taking place (including when case-folding is happening) but not when an accented character comes into play.

@abo-abo abo-abo closed this as completed in 180d329 Jul 8, 2019
@abo-abo
Copy link
Owner

abo-abo commented Jul 8, 2019

Thanks, please test.

@gusbrs
Copy link
Contributor Author

gusbrs commented Jul 8, 2019

Tested here with swiper-20190708.1101. Shinning, as usual. Thank you very much.

astoff pushed a commit to astoff/swiper that referenced this issue Jan 1, 2021
- Capture each part into a group
- Set `ivy--subexps' so that each match group is highlighted
- Switch from greedy to non-greedy

* swiper.el (swiper--delayed-add-overlays): Use
  `swiper--positive-regexps' so that `swiper-isearch' highlighting
  works better.

Fixes abo-abo#2124
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

2 participants