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/ex_getln.c b/src/ex_getln.c
index d000112..fcc1d60 100644
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -2302,10 +2302,10 @@
p = (char_u *)line_ga.ga_data;
p[line_ga.ga_len] = NUL;
- indent = get_indent_str(p, 8);
+ indent = get_indent_str(p, 8, FALSE);
indent += sw - indent % sw;
add_indent:
- while (get_indent_str(p, 8) < indent)
+ while (get_indent_str(p, 8, FALSE) < indent)
{
char_u *s = skipwhite(p);
@@ -2357,11 +2357,11 @@
else
{
p[line_ga.ga_len] = NUL;
- indent = get_indent_str(p, 8);
+ indent = get_indent_str(p, 8, FALSE);
--indent;
indent -= indent % get_sw_value(curbuf);
}
- while (get_indent_str(p, 8) > indent)
+ while (get_indent_str(p, 8, FALSE) > indent)
{
char_u *s = skipwhite(p);