• Login
Community
  • Login

Searching for text returns same Line twice

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
3 Posts 3 Posters 403 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.
  • R
    Roger Cracknell
    last edited by Apr 23, 2025, 8:22 AM

    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

    P 1 Reply Last reply Apr 23, 2025, 1:17 PM Reply Quote 0
    • P PeterJones moved this topic from Notepad++ & Plugin Development on Apr 23, 2025, 1:09 PM
    • P
      PeterJones @Roger Cracknell
      last edited by Apr 23, 2025, 1:17 PM

      @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.)

      A 1 Reply Last reply Apr 24, 2025, 10:24 AM Reply Quote 4
      • A
        Alan Kilborn @PeterJones
        last edited by Apr 24, 2025, 10:24 AM

        @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
        2 out of 3
        • First post
          2/3
          Last post
        The Community of users of the Notepad++ text editor.
        Powered by NodeBB | Contributors