]> granicus.if.org Git - vim/commitdiff
updated for version 7.4.517 v7.4.517
authorBram Moolenaar <Bram@vim.org>
Wed, 19 Nov 2014 12:21:57 +0000 (13:21 +0100)
committerBram Moolenaar <Bram@vim.org>
Wed, 19 Nov 2014 12:21:57 +0000 (13:21 +0100)
Problem:    With a wrapping line the cursor may not end up in the right place.
            (Nazri Ramliy)
Solution:   Adjust n_extra for a Tab that wraps. (Christian Brabandt)

src/screen.c
src/version.c

index 36afc2dcda69a0a8f7aca025fc32b9e71686a9bb..e11bdc37752eac062d6c26c1ab4c37743e84bc0a 100644 (file)
@@ -4456,6 +4456,10 @@ win_line(wp, lnum, startrow, endrow, nochange)
                    /* TODO: is passing p for start of the line OK? */
                    n_extra = win_lbr_chartabsize(wp, line, p, (colnr_T)vcol,
                                                                    NULL) - 1;
+                   if (c == TAB && n_extra + col > W_WIDTH(wp))
+                       n_extra = (int)wp->w_buffer->b_p_ts
+                                      - vcol % (int)wp->w_buffer->b_p_ts - 1;
+
                    c_extra = ' ';
                    if (vim_iswhite(c))
                    {
index 826679ef3839a08891083aead2311d2cf6f660cd..ae9fbad89ddae6f171eee596d2dc6982957787ab 100644 (file)
@@ -741,6 +741,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    517,
 /**/
     516,
 /**/