diff options
author | Bram Moolenaar <Bram@vim.org> | 2014-11-19 13:21:57 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2014-11-19 13:21:57 +0100 |
commit | a365091dbb94e0daea5ea58d1facb1102868cca5 (patch) | |
tree | 81319f55769f23e667291bbd3bf29c708789e73a /src | |
parent | 1ba903fb921b0ebf2e3343a4fdc85fd4803d270c (diff) | |
download | vim-a365091dbb94e0daea5ea58d1facb1102868cca5.zip |
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)
Diffstat (limited to 'src')
-rw-r--r-- | src/screen.c | 4 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/screen.c b/src/screen.c index 36afc2dcd..e11bdc377 100644 --- a/src/screen.c +++ b/src/screen.c @@ -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)) { diff --git a/src/version.c b/src/version.c index 826679ef3..ae9fbad89 100644 --- a/src/version.c +++ b/src/version.c @@ -742,6 +742,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 517, +/**/ 516, /**/ 515, |