Tuesday, December 1, 2015

Re: Fullwidth sign characters, misaligned colorcolumn, and missing visual highlighting

On Di, 01 Dez 2015, boss@airbladesoftware.com 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?
>
> Many thanks,

Looks like a bug to me.

Best,
Christian
--
Eine schöne Frau wäre dumm, wenn sie auch noch klug wäre.
-- Werner Mitsch

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: