Move cursor to the first line, run swiper, then type \_<one\_> as the input.
In the first screenshot below, see how there are 14 lines (from line 10 to line 23) highlighted in the scratch buffer while there are only 7 candidates listed in the minibuffer.
Press C-n and C-p, swiper only visits the 7 lines in scratch buffer that are candidates. The other 7 highlighted lines are skipped over.
Change the input to \_<int\_>.
In the second screenshot below, see how there are 11 lines (line 1 to line 10, and line 26) highlighted in the scratch buffer while there are only 5 candidates listed in the minibuffer.
Press M-q to start replacing the matches. Type in anything other than "int" as the replacement, followed by RET.
Now watch swiper visiting all the 11 highlighted occurrences in buffer and replacing them as expected.
It appears that, for the pattern \_<K\_>, if an occurrence K in buffer adjoins some punctuation characters such as +, *, &, < and > (there might be more) on either or both sides, swiper can find and highlight the occurrence in buffer but somehow cannot add the match to candidate list. In comparison, isearch-forward-regexp is able to highlight and visit all of them as expected. And occurrences adjoining characters such as (, ), , (there might be more) are found and listed correctly.
There is more.
Move the cursor to line 6 which swiper does find and add to candidate list.
Run swiper and give input \_<int\_>.
Watch the cursor jumping to the line 1 instead of staying at line 6.
It works as expected when the input pattern is \bK\b, \<K\>, or just K.
The text was updated successfully, but these errors were encountered: