> On Di, 01 Dez 2015, [email protected] wrote:
> > Hello!
> > 
> > Under certain circumstances the colorcolumn becomes misaligned by one 
> > character:
> > 
> > 1. A lign has a sign whose text is a fullwidth character.
> > 2. The colorcolumn is a column after the end of the text on the line.
> > 
> > In those circumstances the colorcolumn is drawn at column n-1 instead of n.
> > 
> > Here's how to reproduce:
> > 
> > 1. Define a sign whose text is a fullwidth character (e.g. U+FF0B fullwidth 
> > plus sign):
> > 
> >     :sign define foo text=+
> > 
> > 2. Open a file in vim.
> > 
> > 3. Place the sign somewhere:
> > 
> >     :sign place 1 name=foo line=5 buffer=1
> > 
> > 4. Set the colorcolumn to a number greater than the last colum of the line 
> > with the sign:
> > 
> >     :set cc=20
> > 
> > 5a. Expected: the colorcolumn is drawn at column 20.
> > 5b. Actual: the colorcolumn is drawn at column 19.
> > 
> > Furthermore, the line with the sign is no longer highlighted in a visual 
> > selection.  To reproduce (following on from above):
> > 
> > 6. Go to line 4, switch to visual line mode, and select a few lines 
> > encompassing the line with the sign:
> > 
> >     4GV2j
> > 
> > 7a. Expected: lines 4-6 are highlighted.
> > 7b. Actual: line 5 isn't.
> > 
> > Can anyone shed any light on all this?
> > 
> 
> Attached is a patch.
> 
> I tried pretty hard to create a test using the existing facilities from 
> test_listlbr_utf8, since this does already some screen testing. 
> 
> Unfortunately, it seems the colorcolumn isn't captured by the 
> screenchar() function (well i guess it is, but since this is only 
> highlighting, it returns a space). Then I worked around that issue using 
> screenattr() and while this seems to work, for some reasons it did not 
> fail the test with unpatched Vims.
> 
> I suspect, that the cursor movement is not working correctly, because 
> when I break into that test I press l twice to move from column 1 to 
> column 2. But then I thought, it shouldn't hurt to keep that test.

Thanks for the fix.  Not sure if we can make testing this easier.

-- 
hundred-and-one symptoms of being an internet addict:
172. You join listservers just for the extra e-mail.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

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

Raspunde prin e-mail lui