Summary: | copy from Gvim & paste to OpenOffice fails with Gvim 7.2.303 | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Philip Webb <purslow> |
Component: | Current packages | Assignee: | Vim Maintainers <vim> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | High | ||
Version: | unspecified | ||
Hardware: | AMD64 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Philip Webb
2010-03-11 02:48:34 UTC
This is truly weird, and I have no idea what's going on here. The problem is still present in vim-7.2.416. Do you happen to remember what version you were running before you upgraded to 7.2.303? Aha, I have found the patch at fault: 7.2.201, so you most likely upgraded from 7.2.182 I have a workaround for you: :set cb=autoselect,html,exclude:cons\|linux By including the 'html' in there, I can suddenly cut&paste into OpenOffice again. But I believe you have found a bug in the way vim handles this pasting introduced by that patch. I'm working on a more permanent fix. Thanks: I've added your line to ~/.vimrc & can paste into Open Office again. Please note that line breaks are not copied, only the text: is this a bug too ? (In reply to comment #3) > Thanks: I've added your line to ~/.vimrc & can paste into Open Office again. > Please note that line breaks are not copied, only the text: is this a bug too ? Actually that's an expected result of having 'html' in your 'cb' variable: OpenOffice thinks the text you are pasting from vim is html, so it will collapse all linebreaks, extra spaces, etc... And if you happen to be copying real HTML, it will actually interpret the tags into actual OpenOffice attributes, like <li> into bullets, <b>...</b> into bold text, etc. The case for plain text is ugly because of the whitespace squashing, but better than no cut&paste at all. But I have even better news as of today -> There's a real fix available for this. As I was investigating the best way to actually solve this issue, I started a discussion on the vim-dev mailing list explaining the cause of the issue, and before I could write a single line of code, someone else came up with a patch and 7.2.442 was released with the fix in it. I have just added vim-core/vim/gvim-7.2.442 to the Gentoo tree, and the fix works as advertised. This is in unstable ~ARCH for now, so if you're running a stable system you'll have to unmask app-editors/vim-core-7.2.442 and app-editors/gvim-7.2.442 (and maybe app-editors/vim-7.2.442 if you have vim installed as well) Remove that ':set cb...' line from your ~/.vimrc once you upgrade, and you'll be properly pasting plain text from gvim into OpenOffice just like before the last upgrade. Enjoy! And thanks for the bug report. Thanks to you & the Vim devs for identifying & solving the problem. I've updated to 442 , commented the temporary line in ~/.vimrc & copied chunks from a couple of files into OO with formatting retained. |