Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Select next misses matches when starting with selection at the end of a word #340

Closed
erkattak opened this issue Jan 26, 2015 · 2 comments
Closed
Labels

Comments

@erkattak
Copy link

I've noticed that when my selection ends at the end of a word, as I cmd+d through matches it skips matches that don't also end a word. I expect that it would select all matching text.

example screencap
In the above example, select next misses the match within the string contains_tags_scope. I presume this is due to the underscore (a regex word character), but I expect it to select that part of the text regardless.

@benogle benogle added the bug label Jan 26, 2015
@erkattak
Copy link
Author

I've confirmed that this is the same behavior when using the Find > Select All, after selecting text.

@erkattak
Copy link
Author

After some digging I found the tests that show the intention of this.

I'm wondering if it is necessary (by default, at least) to worry about whether or not the originally selected text is bounded by words or non words?

When I have a buffer like so:

thisthisthis

and I do a regular search for this, I expect it to find all three as I step through the results using find-and-replace:find-next.

I think the issue lies in the scanForNextOccurrence method in select-next.coffee. I don't think this method should be checking whether or not a word is selected, and just return the actual characters that match the result.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
2 participants