Christian Brabandt wrote:
> On Fr, 01 Mär 2013, Bram Moolenaar wrote:
>
> > > In the gui, it seems, I get always garbage, since the for some reason I
> > > think nothing is stored into the clipboard and therefore Vim tries to
> > > restore the info from the CUT_BUFFER0, which can only hold latin1
> > > encoded data and it breaks here. I tried uncommenting
> > > clip_mch_lose_selection() in gui_gtk_x11.c and this seems to work, but I
> > > am not really sure (could be, that this relies on some clipboard manager
> > > to work) this is right.
> >
> > If we can't do it right it's better to not set the clipboard.
>
> I would even say don't save the selection in the CUT_BUFFER0 at all or
> only when the clipboard doesn't contain multibyte characters.
>
> I am not sure, when the bug at clip_mch_lose_selection() occured, but I
> think we could even enable it again. Nowadays a clipboard manager is
> running often enough so that the data can then be stored in it and
> correctly restored when querying the clipboard again.
>
> Does the clipboard corruption actually also occur on Windows?
>
> > We have to be careful not to own the selection when we are waiting for
> > an external command to finish, it would block the application that
> > requests the text.
>
> Yeah, but that seems not necessary for system() call, since that call
> blocks vim anyway and the user doesn't see any feedback, while system()
> is running. Nevertheless it is necessary for using :sh or :! commands.
When the command executed by system() obtains the current selection and
Vim owns it, you get a deadlock. I'm not sure if there is a timeout,
but I do remember that long ago it was possible to lockup completely.
--
hundred-and-one symptoms of being an internet addict:
16. You step out of your room and realize that your parents have moved and
you don't have a clue when it happened.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
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/groups/opt_out.