Community
    • Login

    FIND in all files goes to the wrong line when editing

    Scheduled Pinned Locked Moved Notepad++ & Plugin Development
    findfind all in cur
    4 Posts 4 Posters 476 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.
    • Roy BoothR
      Roy Booth
      last edited by

      notepad.JPG

      just downloaded 7.9.1 and im having some issue heres how it occured…

      FIND (word) FIND ALL IN CURRENT DOCUMENT
      which it displays the selected word and line number related to it

      However when i double click on the line and make a change and double click on the next entry the Cursor is now 7 or 8 lines away from where it should be… example word on line 10 cursor moves to line 17

      Alan KilbornA Neil SchipperN 2 Replies Last reply Reply Quote 0
      • Alan KilbornA
        Alan Kilborn @Roy Booth
        last edited by

        @Roy-Booth

        double click on the line and make a change and double click on the next entry the Cursor is now

        This is accepted behavior in Notepad++.
        When you change text after running a search, you shift the position of the hits that occur after it in the document.
        Search output is “static” – it is valid only for the exact data that it is run on.

        Thus you have a few choices:

        • don’t edit your document until you are done examining all of the hits (maybe not realistic depending upon your needs)

        • start editing at hits with the highest line number and work your way to lower line numbers (probably more reasonable)

        • rerun the same search after making edits to produce new results (workable but a bit onerous)

        1 Reply Last reply Reply Quote 1
        • prahladmifourP
          prahladmifour
          last edited by

          This post is deleted!
          1 Reply Last reply Reply Quote -5
          • Neil SchipperN
            Neil Schipper @Roy Booth
            last edited by

            @Roy-Booth

            1. Your title “in all files” disagrees with the body “in current document”

            2. In addition to Alan’s suggestions, here’s another:

            • perform (current doc) s&r so all instances of the text have a loud flag, for ex. "CREATE TABLE(ATTENTION ROY!)
            • do 1 normal search on the altered text; use F3 to cycle thru all hits, making any changes or fixes you require
            • do a final (current doc) s&r so all instances of (ATTENTION ROY!) are removed
            1 Reply Last reply Reply Quote 1
            • First post
              Last post
            The Community of users of the Notepad++ text editor.
            Powered by NodeBB | Contributors