Sunyanfei / vim

Automatically exported from code.google.com/p/vim
0 stars 0 forks source link

`colorcolumn` adds trailing whitespace to any multiline copy-pasted content #332

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Add `set cc=80` to your ~/.vimrc
2. Open any document (e.g., ~/.vimrc)
3. Copy-and-paste code from there (e.g., into the same file)

You'll find that each copy-and-pasted line has trailing whitespace, namely the 
space from the last character in a line to the color column.

This only occurs with vim, not gvim.

Original issue reported on code.google.com by nico.sch...@gmail.com on 16 Feb 2015 at 3:29

GoogleCodeExporter commented 9 years ago
There are many ways to copy-paste code.

Using the normal methods ("yyp" for example) does not suffer this for me.

I'd guess you use the "modeless selection" which allows you to select all sorts 
of non-text, including line numbers and foldtext.

Can you confirm? In what way did you copy the line?

Original comment by benjamin...@rockwellcollins.com on 16 Feb 2015 at 4:34

GoogleCodeExporter commented 9 years ago
I can't seem to reproduce this. Please be more specific how you are 
copy-pasting.

Original comment by chrisbr...@googlemail.com on 17 Feb 2015 at 3:55

GoogleCodeExporter commented 9 years ago
That user is probably highlighting with their mouse to copy text to the desktop 
clipboard.  I say this because this just happened to me.

Original comment by sjbr...@hipmunk.com on 20 May 2015 at 10:52

GoogleCodeExporter commented 9 years ago
Exactly.

Original comment by nico.sch...@gmail.com on 21 May 2015 at 6:40

GoogleCodeExporter commented 9 years ago
I think in that case, this is unavoidable and one better uses the explicit "+y 
command to copy and paste to the system clipboard.

Closing as invalid in this case.

Original comment by chrisbr...@googlemail.com on 22 May 2015 at 7:08