Lack wrote:

Somehow I didn't get the original message in this thread.

> On Jun 3, 9:15 pm, Tony Mechelynck <[email protected]>
> wrote:
> > IIUC, clipboard=html is meant to import raw HTML into Vim (with tags and
> > all), adit it, and send it back. (Again, IIUC) it's the user's
> > responsibility to check that whatever he "yanks" into "+ when
> > clipboard=html "makes sense" wherever it will be pasted next (and even
> > plain text can "make sense" as HTML, if you remember that any number of
> > consecutive whitespace characters will be interpreted as "either one
> > space, or, if necessary considering the width of the text container, one
> > linebreak"). (IIUC) one should leave 'clipboard' to not-HTML in most
> > cases, except temporarily when editing HTML source to be exchanged as
> > HTML with some other application. The "expected behaviour" when
> > (&clipboard !~ '\<html\>') would then (IIUC) be whatever Vim used to do
> > before that option value existed.
> 
> Thanks, Tony, I think that gives me the courage to attempt a proper
> solution: Only present text/html as a DND or selection target when
> clipboard contains 'html'.
> 
> The only thing I'm not sure about is how to get a callback all the way
> down into gui_gtk_x11.c when someone does either
>   :set clipboard+=html
> or
>   :set clipboard-=html
> 
> Since in both cases I think the proper action to take is to adjust the
> GTK "section targets" and "dnd targets".
> 
> Anyone have any tips on the "right way" to do that?

As far as I know this should not be needed.  An application lists the
targets it supports.  The client then tries these targets one by one
until there is one that works.

I can copy/paste between all my applications and Vim.  I suspect the
problem is on the other side.  But I'm not sure.  The GTK docs are
unclear about these things.

-- 
hundred-and-one symptoms of being an internet addict:
155. You forget to eat because you're too busy surfing the net.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.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

Raspunde prin e-mail lui