2018-02-10 17:48 GMT+09:00 John Little <[email protected]>:

> A few findings:
>
> 1. > Turning on "Ignore selection" in the clipboard settings has stopped
> it.
>

That's because the clipboard manager stops interfering with Vim's attempt
to obtain and hold the ownership of the CLIPBOARD selection.

In order for Vim to be able to transfer the contents of the selection, it
has to obtain the ownership of the selection first and hold it at least
until it starts transferring the data.  The transfer won't happen until
another X11 client asks Vim to do that.

It seems that, under certain conditions (mainly due to memory limitation
imposed on by the X server in use), the clipboard manager tries taking away
the ownership from Vim in order to create its own copy of the contents of
Vim's CLIPBOARD selection before Vim gets ready for the transfer; that
conflict causes the trouble.


> Not good, I use it all the time, in vim or out.
>

Unless you need a copy of selection data even after an X client associated
with it terminates normally or aborts due to a failure in its connection to
the X server, the clipboard manager wouldn't be useful much.


> 2. The failure occurs if the selection is more than 262144 bytes, 2**18.
>

That could be the critical value at which the conditions I mentioned above
in a vague way are met.


>
> 3. A workaround for me is to take the suggestion in the comment in
> x_error_handler in os_unix.c:
>
> /* Silently continuing might be an alternative... */
>
> and commenting out the preserve_exit() call.
>

That should be done per protocol request; otherwise, ignoring protocol
errors could result in a crash of the whole system.  But if you haven't
experienced severe trouble with it yet, that might give us a hint as to how
to fix the issue, since ignoring protocol errors intentionally is actually
seen in toolkit implementation, though that's rather exceptional.


> Regards, John Little
>

Thank you for valuable information.  I'll looking into the issue together
with another X selection issue I'm taking on.

Best regards,
Kazunobu Kuriyama


> --
> --
> 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].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
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].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui