Le jeudi 11 septembre 2014 14:23:46 UTC-4, Christian Brabandt a écrit :
> Hi Jason!
>
>
>
> On Di, 09 Sep 2014, Jason Pleau wrote:
>
>
>
> > Hello,
>
> >
>
> > I cannot paste from the system clipboard with vim if it is opened
>
> > after I copied my text into the clipboard. I am using set
>
> > clipboard=unnamedplus.
>
> >
>
> > A bisect with hg has lead me to believe that this change introduced
>
> > my clipboard issue:
>
> >
>
> > http://code.google.com/p/vim/source/detail?r=7766142fc7d3e90c2e15a9c606efcd97331edef8
>
> >
>
> >
>
> >
>
> > I am on Linux (Debian unstable).
>
> >
>
> > This is what I use as a minimal vimrc to reproduce:
>
> >
>
> > set clipboard=unnamedplus
>
> > finish
>
>
>
> Interesting. I can reproduce the issue. I can't see how patch 7.4.396 can
> cause
>
> this. However I noticed a couple of things:
>
>
>
> vim -u <(echo set clipboard=unnamedplus) -N (paste -
> E353)
>
> vim -u <(echo set clipboard=unnamedplus) -N --noplugin (paste -
> E353)
>
> vim -u NONE -N -c 'set clipboard=unnamedplus' (paste works)
>
> vim -u <(echo set clipboard=unnamedplus ei=VimEnter) -N (paste works)
>
> vim -u <(echo ':au VimEnter * :set clipboard=unnamedplus' ) -N (paste -
> E353)
>
>
>
>
>
> I am not sure how to debug this further. When running a debug built with gdb,
> it
>
> always pastes correctly.
>
>
>
> Best,
>
> Christian
>
> --
>
> Macht ist das stärkste Aphrodisiakum.
>
> -- Henry Kissinger
Hello again Christian
I have worked a bit on this tonight, and another bisect revealed 396 as the
root of the issue.
I don't have much knowledge of vim's source code.. however please see the
attached patch. Removing the start_global_changes() and end_global_changes() in
src/ex_cmds2.c fixes the issue for me. (note: I haven't tested anything else
except the issue at hand, with this patch)
I'm not familiar with vim internals to understand everything from
start_global_changes() and end_global_changes(), they seem to save the
clipboard (and "emptying" the unnamed clipboard), and then restore it. I can
see mentions of CLIP_UNNAMED_PLUS in end_global_changes(), but not in
start_global_changes()
Thanks !
--
--
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.
diff -r b53b469a7bea src/ex_cmds2.c
--- a/src/ex_cmds2.c Thu Sep 11 22:50:09 2014 +0200
+++ b/src/ex_cmds2.c Fri Sep 12 23:31:02 2014 -0400
@@ -2464,9 +2464,6 @@
* great speed improvement. */
save_ei = au_event_disable(",Syntax");
#endif
-#ifdef FEAT_CLIPBOARD
- start_global_changes();
-#endif
if (eap->cmdidx == CMD_windo
|| eap->cmdidx == CMD_tabdo
@@ -2594,9 +2591,6 @@
curbuf->b_fname, TRUE, curbuf);
}
#endif
-#ifdef FEAT_CLIPBOARD
- end_global_changes();
-#endif
}
/*