On Fr, 18 Dez 2020, Charles Campbell wrote:

> Christian Brabandt (Vim Github Repository) wrote:
> > 
> >     As far as the clipboard goes: it copies the clipboard into a local
> >     variable, and only if the clipboard value has changed during the
> >     course of netrw's operation will netrw restore the clipboard value
> >     (thus avoiding having netrw always be the last one to modify the
> >     clipboard).
> > 
> > How about adding a configuration option to leave the clipboard alone if
> > set. This would solve two problems:
> > 
> >   * the clipboard won't be accessed at all if configured. That means,
> >     Neovim guys wouldn't have any problems, since the external
> >     clipboard provider may be slow.
> >   * It won't corrupt the clipboard in case of any non-text items in it.
> > 
> > People complaining could then set this variable and be fine.
> > 
> > 
> The only problem -- something netrw does inadvertently modifies the
> clipboard. That ends up with it being unexpectedly changed, which means
> "clipboard won't be accessed at all" is not going to happen. Its like
> history -- I don't want to change the history, but there's a lot of
> operations that netrw does which change the history -- so there's a lot of
> code to keep the history unchanged. I could have netrw optionally not
> restore the clipboard, but I'm sure (because of earlier complaints) that
> there will be a raft of new complaints. Well, I guess I'll put in
> yet-another-option to prevent netrw from doing a save&restore of the
> clipboard (g:netrw_clipboard).

When would that happen, that netrw modifies the clipboard 
unintentionally. Wouldn't that only be the case when the clipboard 
option is set or the guioption includes a/A/p?

I suppose if the user explicitly uses "+y to paste to the clipboard in 
netrw, that should be okay.

> It'd be a help if vim itself had an option to leave something alone (ie.
> setl leavealone="history:clipboard:jumps"); then netrw and other plugins
> could set that, do their job, then unset it.

Wouldn't setting guioptions and clipboard option to a value that exclude 
clipboard interaction be good enough?

Thanks,
Christian
-- 
Brüllt ein Mann, ist er dynamisch.
Brüllt eine Frau, ist sie hysterisch.
                -- Hildegard Knef

-- 
-- 
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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20201218162405.GR22416%40256bit.org.

Raspunde prin e-mail lui