Community
    • Login

    need help with Remove Unmarked Lines option

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    3 Posts 2 Posters 1.2k Views 2 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.
    • premkumar bhaskalP Offline
      premkumar bhaskal
      last edited by

      Hi,
      I am facing some problem understanding the Bookmark -> “Remove Unmarked Lines” option.

      The debug info from my notepad++.

      Notepad++ v8.1.4 (64-bit)
      Build time : Aug 21 2021 - 13:04:59
      Path : C:\Program Files\Notepad++\notepad++.exe
      Command Line :
      Admin mode : OFF
      Local Conf mode : OFF
      Cloud Config : OFF
      OS Name : Windows 10 Enterprise (64-bit)
      OS Version : 1909
      OS Build : 18363.1801
      Current ANSI codepage : 1252
      Plugins : LocationNavigate.dll mimeTools.dll NppConverter.dll NppExport.dll

      I have 3 lines in text window, I searched for one line and marked it. Then I selected the Bookmark -> “Remove Unmarked Lines” option to remove the unmarked lines, but surprisingly all the lines were removed. Note this is an example only, I am facing same problem with a text content of production error lines which I cannot share here.

      3 lines with one marked using regex ^one$
      dc3b8043-e7af-4f30-bfbe-4d4d112135ad-image.png

      chose option to remove unmarked lines.
      5904b5f5-1e3c-426e-a7e9-d470a47682a1-image.png

      All lines are removed.
      68354419-ead7-43b7-8b44-97437c81d6bc-image.png

      Could you please help to understand how to remove lines which are not marked?

      Thanks,
      Prem

      PeterJonesP 1 Reply Last reply Reply Quote 0
      • PeterJonesP Offline
        PeterJones @premkumar bhaskal
        last edited by PeterJones

        @premkumar-bhaskal ,

        You have confused “Marks” with “Bookmarks” – they are similarly named, so it’s understandable.

        If you added the “Bookmark line” checkbox in the Mark Dialog, and Mark All, then it will add a circle ⚫ to the left of any lines that have a Mark (which is indicated by the change in color on the specific text); this ⚫ is the Bookmark.

        a6bb13b2-bd36-4249-9f1e-d434846b2a64-image.png

        After adding those Bookmarks, now Search > Bookmark > Remove Unmarked Lines will keep the one line.
        c6241c42-874c-48e3-a6b7-81710b4281b5-image.png

        There’s a (relatively new) section in the online usermanual that compares Bookmarks vs Marks

        1 Reply Last reply Reply Quote 2
        • premkumar bhaskalP Offline
          premkumar bhaskal
          last edited by

          great. Thank you for the quick reply.

          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