Gary Johnson
unread,May 16, 2019, 5:51:44 PM5/16/19Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to vim...@googlegroups.com
I use Ingo Karkat's UnconditionalPaste plugin a lot, especially the
glp command when I've copied something character-wise and want to
paste it line-wise.
I've noticed on Windows, that if I copy text from some other Windows
program and attempt to paste into gvim using the glp command, I get
this error message and no pasted text.
E353: Nothing in register *
However, pasting with the "*p command works fine.
I tried to troubleshoot the problem using the command
:debug normal glp
but when single-stepping through the plugin, there was no error and
pasting worked. I finally discovered that by setting a breakpoint
at line 32 of the UnconditionalPaste#Paste function, I could use the
continue command to run the plugin to that point and also use
continue to finish running the plugin without error. If I set the
breakpoint any later in that function, I would get the error after
the first continue. If I set the breakpoint any earlier in that
function, I would get the error after the second continue.
Here is line 32 of that function:
execute 'normal! "' . l:regName . (l:count ? l:count : '') . a:1
Since this behaved like a timing problem, I inserted this command
immediately before that line.
sleep 10m
With that, the glp command works fine. That's my workaround for
now.
The vimrc I used for troubleshooting contains only this line.
set clipboard^=unnamed
I'm using Vim 8.1.1244 and UnconditionalPaste 4.20 on Windows 10.
I've had no problems using glp on Linux, neither in gvim nor in
terminal vim.
Regards,
Gary