tilda icon indicating copy to clipboard operation
tilda copied to clipboard

Multi-line clipboard paste warning feature

Open kohnish opened this issue 4 years ago • 2 comments

Do you think we can implement it? I'm happy to investigate how to do it.

kohnish avatar May 01 '20 17:05 kohnish

There is a function called cpaste in tilda_window.c that invokes the right function in the VTE library to paste the clipboard content. You would probably need to check the current content of the clipboard first using some other means (GTK should have functions to get the clipboard content). If the content is multiline or exceeds a certain number of bytes then you could show a dialog. The whole thing would need to be configurable in the wizard (enable/disable, number of bytes or lines to show a warning). Remember that a user might also be pasting a single line with a large amount of data.

lanoxx avatar May 02 '20 11:05 lanoxx

Thanks for the tip. It seems cpaste is used for ctrl + shift + v paste. I use shift insert / middle click. I guess it is default feature of linux/x/wayland. So I need to somehow capture it before pasting.

kohnish avatar May 02 '20 15:05 kohnish