tilda
tilda copied to clipboard
Multi-line clipboard paste warning feature
Do you think we can implement it? I'm happy to investigate how to do it.
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.
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.