[Lazarus] Where can I switch OFF automatic copy in code editor?

Bo Berglund bo.berglund at gmail.com
Tue Jul 21 11:37:45 CEST 2020


On Mon, 20 Jul 2020 13:26:08 +0200, Martin Frb via lazarus
<lazarus at lists.lazarus-ide.org> wrote:

>
>> But I made a test now and just selecting text does not put it into the
>> clipboard.

>Good.

>
>> But when a line that is selected inside the code editor is moved using
>> the mouse, then it replaces whatever is in Clipboard.

>Strange. Not indented.
>

>> I have no clue about any secondary clipboard, I use Notepad++ on my
>> Windows laptop and that is where I copied the two lines.

>That is a Linux thing.
>Try this (in a terminal)

Do you mean a terminal window in the RPi GUI on a monitor attached to
the RPi itself?

>
>- Select and Copy some text (ctrl-v, or context menu copy)
>- Select other text
>- Middle click => inserts the other text
>- Paste (context menu) insert the original text

So now I used the Text Editor on RPi *via VNC* for testing:
- Select and copy text
- Move caret to other location and Ctrl-V paste (works)
- Select text somewhere
- Middle click mouse when it is somewhere else in the text.
  Pastes on mouse location without moving caret from selection.
- Move caret to other location in text, this clears the selection
- Middle click does nothing now!
- But Ctrl-V pastes the original copied text

Then starting Lazarus and inside the code editor:
- Select and copy text
- Move caret and Ctrl-V paste works
- Select other text
- Without moving caret middle click somewhere - pastes selected text
- Move caret and middle click - nothing happens
- Ctrl-V paste - *previously* copied text pasted

Seems like middle click will paste whatever is currently selected at
the location where the mouse pointer is moved.

>
>> Then inside the RaspberryPi VNC
>Do you use a shared clipboard, or other VNC clipboard functionality?
>Maybe vnc is messing around.

I don't know how this works, I have not modified any VNC config I am
aware of. It probably uses the installation defaults.
But I very often move text back and forth between Win and RPi using
Copy/Paste, so using the clipboard.


Based on the above experiments it seems like I can make copies of a
piece of text by just selecting it and then pointing the mouse at the
destination and hit the middle button. It will then be copied there.

Since I did not know that I had been holding the Ctrl key on the
keyboard while dragging the selection to the destination. This action
seems to affect the clipboard so what was in it is replaced by the
dragged text.

I will change my work habit...

>If vnc is pulling either or both clipboards....
>What happens to the clipboard, if you select text, and do nothing for a 
>minute?
>
>What happens to the clipboard, if you select text in a terminal (on the 
>rpi) and middle click it?

I cannot really do any of the "on the RPi" stuff since I do not have a
monitor to connect the RPi to and no other keyboard or mouse either.
VNC has worked reasonably good over the years, first with TightVNC and
then later with the RealVNC that now come bundled with the RPi images.
So I enable the VNC server on all of my GUI style RPi units and use
the RealVNC application on my Windows10 notebook computer to use the
RPi desktop.
Still have some older RPi units so I also occationally use TightVNC
for these.

But the tests you suggested revealed previously hidden (for me)
functionality I can use going forward!

 Thanks!


-- 
Bo Berglund
Developer in Sweden



More information about the lazarus mailing list