Skip to content

Commit 578479a

Browse files
committed
updated for version 7.4.517
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)
1 parent e4878c5 commit 578479a

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/screen.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4456,6 +4456,10 @@ win_line(wp, lnum, startrow, endrow, nochange)
44564456
/* TODO: is passing p for start of the line OK? */
44574457
n_extra = win_lbr_chartabsize(wp, line, p, (colnr_T)vcol,
44584458
NULL) - 1;
4459+
if (c == TAB && n_extra + col > W_WIDTH(wp))
4460+
n_extra = (int)wp->w_buffer->b_p_ts
4461+
- vcol % (int)wp->w_buffer->b_p_ts - 1;
4462+
44594463
c_extra = ' ';
44604464
if (vim_iswhite(c))
44614465
{

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -741,6 +741,8 @@ static char *(features[]) =
741741

742742
static int included_patches[] =
743743
{ /* Add new patch number below this line */
744+
/**/
745+
517,
744746
/**/
745747
516,
746748
/**/

0 commit comments

Comments
 (0)