> > Thanks for creating this test.
> > There is another check for n_extra becoming negative, and if I comment it
> > out no test fails.
> > Perhaps you can manage to write a test for that one too?
> > This is in line 1215 of src/drawline.c
> 
> 
> I created a test that exercises this line. But I ran into some bugs.
> If you source the following script:
> 
> -------------------------------------------------------------------------------------
> 10new
> 20vnew
> call setline(1, repeat('aa ', 200))
> setlocal breakindent breakindentopt=shift:4 linebreak showbreak=>>
> setlocal number
> set cpo+=n
> normal 12gj
> redraw!
> normal $
> redraw!
>  
> -------------------------------------------------------------------------------------
> 
> You will see that the cursor is positioned a few characters before the end
> of the line and it cannot be moved to the end of the line. Also, if you move
> the cursor to the left by pressing "h" quite a few times (to cause the
> screen
> to scroll down), you will see the cursor can be positioned on the
> 'showbreak' characters.

It looks like this happens because the " >>" in the first line is not
counted, thus when w_skipcol is non-zero.  It's also strange that there
is a space before ">>".  Perhaps Christian knows what needs to change to
fix this.

-- 
The budget process was invented by an alien race of sadistic beings who
resemble large cats.
                                (Scott Adams - The Dilbert principle)

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/202109031722.183HMwW3598755%40masaka.moolenaar.net.

Raspunde prin e-mail lui