CL3 icon indicating copy to clipboard operation
CL3 copied to clipboard

Does not work with TextEditorAnywhere

Open Salted-Bread opened this issue 2 years ago • 1 comments

Using TextEditorAnywhere causes issues when the AHK script is running.

TextEditorAnywhere allows people to use whatever editor (Vim in this case) pretty much anywhere by opening a temporary file in the editor and then pasting the text from the file into the clipboard. Running this script causes it to instead copy and then paste whatever was copied before.

Say you copied the text "Bread" like you would with any text, it will now be the latest item in the Clipboard history and pasting just puts "Bread" into the text box. Now you use TextEditorAnywhere to write some text like "Salad" and once you exit it to have the text "Salad" pasted into the text box it will instead paste "Bread" again and checking the history shows that the "Salad" text is second in the list with "Bread" being pushed back to the first spot.

I've tried to somehow work around this issue, but have yet to find anything that works.

Salted-Bread avatar Jun 28 '23 14:06 Salted-Bread

I'm not familiar with TextEditorAnywhere (TEA), but I suspect it is rather vim itself and not the "wrapper" (TEA) that launches it. Vim has separate keybindings for copy/paste so I'm not that surprised that it won't paste as CL3 uses ctrl+v to paste and ctrl+c to copy (these are hard-coded in CL3) and vim uses non-standard keybindings for those actions.[1]

The paste is sent here https://github.com/hi5/CL3/blob/master/cl3.ahk#L710 so you may wish try and change it to something that works for vim.

It is probably not something I can fix.

[1] https://phoenixnap.com/kb/cut-copy-paste-vim

hi5 avatar Jun 28 '23 18:06 hi5