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

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20190516215206.GC21348%40phoenix.
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui