Community
    • Login

    Searching for text returns same Line twice

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    3 Posts 3 Posters 97 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.
    • Roger CracknellR
      Roger Cracknell
      last edited by

      When searching an XML file for the text “AttachmentBinaryObject” it returns the same line (including the embedded file data) twice!?!?!

      b742fe2f-9cae-4d5f-9fb0-56f59238181d-image.png

      PeterJonesP 1 Reply Last reply Reply Quote 0
      • PeterJonesP PeterJones moved this topic from Notepad++ & Plugin Development on
      • PeterJonesP
        PeterJones @Roger Cracknell
        last edited by

        @Roger-Cracknell ,

        it returns the same line (including the embedded file data) twice!?!?!

        Your screenshot shows it’s a long line (it’s shown as wrapped above). My guess, though I cannot prove it, is that there’s another match later on the line. Yes: I just confirmed that if the line is long enough, Search Results can split the results on a single line into multiple entries in the Search Results panel. If you double-click on the second line in the Search Results, the editor panel will scroll to the appropriate portion of the long line, and you’ll likely see another match. (Or you can use F4 to loop through all the matches, one at a time)

        (Aside: the “Notepad++ & Plugin Development” category is only if you are talking about writing a plugin yourself, or if you were digging into the codebase of Notepad++ yourself. If you are just asking for help with Notepad++, the “Help Wanted” category is where it goes. I moved your question to the appropriate category.)

        Alan KilbornA 1 Reply Last reply Reply Quote 4
        • Alan KilbornA
          Alan Kilborn @PeterJones
          last edited by

          @PeterJones said:

          if the line is long enough, Search Results can split the results on a single line into multiple entries in the Search Results panel

          Can we quantify “long enough”?
          Is this behavior worth documenting in the user manual?


          Note that the above discussion presumes this setting is checkmarked:
          2ed6b732-e13b-4d33-901f-700fb46d2f83-image.png

          If it is uncheckmarked, then each match for sure gets its own line in Search results regardless of length of line.

          1 Reply Last reply Reply Quote 3
          • First post
            Last post
          The Community of users of the Notepad++ text editor.
          Powered by NodeBB | Contributors