Mercurial > vim
diff src/ui.c @ 5995:ef83b423ebf7 v7.4.338
updated for version 7.4.338
Problem: Cannot wrap lines taking indent into account.
Solution: Add the 'breakindent' option. (many authors, final improvements by
Christian Brabandt)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Wed, 25 Jun 2014 14:39:50 +0200 |
parents | a076237d1c38 |
children | 7766142fc7d3 |
line wrap: on
line diff
--- a/src/ui.c +++ b/src/ui.c @@ -3162,15 +3162,15 @@ vcol2col(wp, lnum, vcol) /* try to advance to the specified column */ int count = 0; char_u *ptr; - char_u *start; + char_u *line; - start = ptr = ml_get_buf(wp->w_buffer, lnum, FALSE); + line = ptr = ml_get_buf(wp->w_buffer, lnum, FALSE); while (count < vcol && *ptr != NUL) { - count += win_lbr_chartabsize(wp, ptr, count, NULL); + count += win_lbr_chartabsize(wp, line, ptr, count, NULL); mb_ptr_adv(ptr); } - return (int)(ptr - start); + return (int)(ptr - line); } #endif