Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
This repository was 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

Description

@erkattak

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.

Activity

  1. erkattak commented on Jan 26, 2015

    @erkattak
    Author

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

  2. erkattak commented on Feb 27, 2015

    @erkattak
    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 join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions