Community
    • Login

    need help with Remove Unmarked Lines option

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

          great. Thank you for the quick reply.

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