Hi,
I have found a breakindent bug.

Take the attached script and source it. Note, how the final d seems to be 
further to the right, then expected. (It isn't even reachable, if you 
press $ the cursor will stay before it, but pressing ga will show, that 
you are actually on the correct location).

The bug seems to be, that under certain conditions, an extra indent is 
applied, although it isn't necessary.

Here is a half-working patch that seems to fix it, but I am not sure,
this is the right way and also this doesn't work, if 'sbr' is set.

diff --git a/src/screen.c b/src/screen.c
--- a/src/screen.c
+++ b/src/screen.c
@@ -3713,6 +3713,10 @@ win_line(wp, lnum, startrow, endrow, noc
                    c_extra = ' ';
                    n_extra = get_breakindent_win(wp,
                                       ml_get_buf(wp->w_buffer, lnum, FALSE));
+                   /* reset n_extra, when the tabstop would be at the correct
+                    * location without bri */
+                   if (col == 0 && n_extra == vcol % wp->w_buffer->b_p_ts)
+                       n_extra = 0;
                    /* Correct end of highlighted area for 'breakindent',
                     * required when 'linebreak' is also set. */
                    if (tocol == vcol)


Best,
Christian
-- 
Frage an Radio Eriwan:
"Darf ich jetzt wieder Äpfel aus Tschernobyl essen?"
Antwort:
"Im Prinzip ja. Aber die Kerne müssen Sie danach in einem Bleifaß vergraben." 

-- 
-- 
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.
let line="    a\tb\tc\t d"
20 vnew
call setline(1,line)
exe "norm! $"
set bri
exe "norm! ga"

Raspunde prin e-mail lui