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.7k Views
    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
      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
        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
        • First post
          Last post
        The Community of users of the Notepad++ text editor.
        Powered by NodeBB | Contributors