Community
    • Login

    Clipboard content is lost after using Ctrl+L (Delete Line)

    Scheduled Pinned Locked Moved Notepad++ & Plugin Development
    4 Posts 3 Posters 105 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.
    • Mateusz KowalskiM
      Mateusz Kowalski
      last edited by

      I believe there is a bug related to the clipboard.

      Steps to reproduce:

      1. Select some text in Notepad++.
      2. Press Ctrl+C to copy it to the clipboard.
      3. Move the cursor to any line.
      4. Press Ctrl+L (Delete Line).

      Expected result:
      The clipboard content should remain unchanged.

      Actual result:
      The clipboard content becomes empty and the previously copied text is lost.

      Notes:
      The issue happens even if Ctrl+L is used only once after copying.
      It seems that deleting a line clears the clipboard content.

      Environment:
      Notepad++ version: 8.9.1 (64bit)
      OS: Windows 10

      Alan KilbornA 1 Reply Last reply Reply Quote 0
      • guy038G
        guy038
        last edited by guy038

        Hello, @mateusz-kowalski and All,

        By default, the Ctrl + L operation is a Scintilla command which just CUT the current line contents

        Thus, obviously, a Ctrl + V operation just restores this cut line


        If you need to preserve the previous status of the clipboard, use, first, the default Ctrl + Shift + L shortcut which deletes the current line contents

        Then, the use of the Ctrl + V operation will correctly paste the clipboard contents !

        Best Regards,

        guy038

        1 Reply Last reply Reply Quote 1
        • Alan KilbornA
          Alan Kilborn @Mateusz Kowalski
          last edited by Alan Kilborn

          @Mateusz-Kowalski said:

          The clipboard content becomes empty

          It’s probably not empty.
          It probably contains a single line-ending.
          You likely moved your caret to a line with no content, before issuing the Ctrl+L.

          1 Reply Last reply Reply Quote 2
          • Mateusz KowalskiM
            Mateusz Kowalski
            last edited by

            Okay thx. I understand, sorry for the false alarm.
            Best Regards,

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