Community
    • Login

    Where to report a bug? Track position changes for Find In Files

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    2 Posts 2 Posters 1.9k Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Patrick MooreP Offline
      Patrick Moore
      last edited by

      It’s not really a bug but an improvement that could be made.

      To replicate:

      Use Find > Find In Files

      Search for a pattern that exists in multiple hits in one file.

      See the results pane. Double-click on first hit to go to position of search.

      Make edits, i.e. replacing the search keyword with something new. Must use string of differing length.

      Double-click on second hit to go to position and notice the selected text is not correct. The carat/cursor will be off by the difference in string length of the original keyword and the new text.

      Is there any way to have Find In Files track edits in the document and update cursor/carat location for next results?

      Here’s a demonstration:

      https://vimeo.com/154775691/48e666d28f

      1 Reply Last reply Reply Quote 0
      • Scott SumnerS Offline
        Scott Sumner
        last edited by

        I think this is a great feature suggestion. When I first started using N++ I noticed this and have just sort of indifferently lived with it since.

        Here’s a hint though…usually when this situation occurs you are making edits nearby your found pattern. If you start at the bottom of the file (last hit) and make your edits, then double-click on an earlier (closer to top) hit, you will find that the positioning is accurate (because your edits have not altered the position data for the earlier match). Just an idea; it works a lot for my type of edits like this.

        1 Reply Last reply Reply Quote 1

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        • First post
          Last post
        The Community of users of the Notepad++ text editor.
        Powered by NodeBB | Contributors