On 18/06/10 16:15, Sarah Strong wrote:
When you quit vim in X11-based systems, you lose any data that was
copied from vim to the system clipboard. You can find more information
about this bug and how to fix it at
https://wiki.ubuntu.com/ClipboardPersistence.

I'm not 100% sure but I think this is an X11 security measure. So I'd check
that out before diving too deep into the Vim sources...

It isn't, but taking a conservative approach to copies by only copying
a reference to the data until it's actually pasted is a deliberate
choice by X for performance reasons. That's why the ClipboardManager
specification exists - to allow applications like vim to say "I'm a
user-facing application and I'd like my contents to be available after
I've quit," without changing X's basic approach. You can check out
http://en.wikipedia.org/wiki/Clipboard_manager and
http://freedesktop.org/wiki/ClipboardManager for more information.

Thanks!
-Sarah Strong


According to the help, Vim does save register + when quitting, as follows:

                                                        *x11-cut-buffer*
There are, by default, 8 cut-buffers: CUT_BUFFER0 to CUT_BUFFER7.  Vim only
uses CUT_BUFFER0, which is the one that xterm uses by default.

Whenever Vim is about to become unavailable (either via exiting or becoming
suspended), and thus unable to respond to another application's selection
request, it writes the contents of any owned selection to CUT_BUFFER0.  If the
"+ CLIPBOARD selection is owned by Vim, then this is written in preference,
otherwise if the "* PRIMARY selection is owned by Vim, then that is written.


Best regards,
Tony.
--
If you want to know what god thinks of money, just look at the people
he gave it to.
                -- Dorthy Parker

--
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