-
-
Notifications
You must be signed in to change notification settings - Fork 339
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: ivy-yank-word less useful when there are multiple matches in the current line #314
Comments
Thanks. |
Well, the change does fix the issue for M-j (or whatever key that But the point still jumps to the first match when either the pattern "Some" is entered manually on prompt or |
* swiper.el (swiper--current-line): (swiper--current-match-start): New defvar. (swiper--init): Update. (swiper--update-input-ivy): Don't move to line NUM if `swiper--current-line' is equal to NUM. Later, store NUM in `swiper--current-line' to avoid calling `line-number-at-pos'. Additionally store `swiper--current-match-start' - it's necessary to move there before searching for the regexp, since the point currently is after the old regexp. Fixes #314
Thanks, please test. In the future, if you find that I closed an issue opened by you, and the issue isn't solved, please re-open it. If the issue isn't tracked by Github, I'll likely forget about it. |
Verified. Thanks very much. I don't have the privilege of re-opening closed issues even opened by myself. :) In the future I can open a new issue and refer the old one in it. |
Reproduction:
1- In scratch buffer enter the following line:
2- Place the cursor on the second 'S' - one that following the '='.
3- Run swiper, press
C-w
to yank the word "Some" (or type in the word "Some").4- Watch the point jumping to the first occurrence of "Some".
5- It is now unable to yank the word "_func".
With case folded, this can happen even more often in C and C++ code.
There is a workaround: at the prompt type "_f", instead of pressing
C-w
again in step 5. It is less convenient though.The text was updated successfully, but these errors were encountered: