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)
diff --git a/src/ui.c b/src/ui.c
index 570b848..db13555 100644
--- a/src/ui.c
+++ b/src/ui.c
@@ -3162,15 +3162,15 @@
/* 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