Closed mark2185 closed 1 year ago
This happens when a text is pasted into scli, while the focus is not on the input area (e.g. on the chat history). And yes, the characters in the pasted text are interpreted as keystrokes, which can perform actions such as send reactions, etc. This can indeed be annoying, or worse.
We can check whether the focus is on the input area before allowing to paste the text. This should be possible with the 'bracketed paste mode' that is already used elsewhere in scli.
Today I tried pasting a commit diff and that somehow reacted to some messages in other chats, opened up a youtube link, and froze up
scli
, and I probably have caused a small fire somewhere. I know it's because the terminal emulator parsed it as input.I think I saw an issue relating to this somewhere, but I can't seem to find it.
In any case, something like
:attachClipText
would be great, it only needs to paste the clipboard contents directly as-is.