odeke-em / vim

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

showbreak with non-ascii char: after break: cursor always a wrong position while typing #271

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The following problem occurs with Vim 7.4.475 and didn't occur with Vim 7.4.417.

What steps will reproduce the problem? Start vim or gvim (doesn't matter):
1. Set showbreak (sbr) to a non-ASCII character, e.g. U+21aa
2. Set wrap and enter a line such that line wrapping occurs. 
3. After the line break: The cursor is in the wrong position (ahead of one 
character)

What is the expected output? What do you see instead?
Expected: Cursor at the position where the next character will occur.
See instead: Cursor at one position ahead.

Please see the attached screen shot: The next character you type will be 
inserted *before* the cursor at the position directly after "k" (without any 
spaces).

What version of the product are you using? On what operating system?

Fedora 20:
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Oct 13 2014 08:56:57)
Included patches: 1-207, 209-475

After a quick look at the source (of screen.c) I cannot see the reason at once. 
I didn't debug, but perhaps the 6172 change
#ifdef FEAT_CONCEAL
   if (is_concealing && vcol_off > 0)
       /* there are characters to conceal */
       tab_len += vcol_off;
#endif
is of interest here.

Original issue reported on code.google.com by Ludwi...@gmx.de on 17 Oct 2014 at 8:05

Attachments:

GoogleCodeExporter commented 9 years ago
I think this was fixed with 7.4.478. Therefore closing.

Original comment by chrisbr...@googlemail.com on 18 Oct 2014 at 12:06

GoogleCodeExporter commented 9 years ago
I compiled and installed 7.4.481 and the problem (above) didn't show up there. 

Thank you very much. 

Original comment by Ludwi...@gmx.de on 18 Oct 2014 at 9:46