summaryrefslogtreecommitdiff
path: root/src/eval.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/eval.c')
-rw-r--r--src/eval.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/eval.c b/src/eval.c
index 88b95497..27783792 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -4485,7 +4485,16 @@ f_foldtext(argvars, retvar)
s = skipwhite(ml_get(lnum));
/* skip C comment-start */
if (s[0] == '/' && (s[1] == '*' || s[1] == '/'))
+ {
s = skipwhite(s + 2);
+ if (*skipwhite(s) == NUL
+ && lnum + 1 < (linenr_T)vimvars[VV_FOLDEND].val)
+ {
+ s = skipwhite(ml_get(lnum + 1));
+ if (*s == '*')
+ s = skipwhite(s + 1);
+ }
+ }
txt = _("+-%s%3ld lines: ");
r = alloc((unsigned)(STRLEN(txt)
+ STRLEN(vimvars[VV_FOLDDASHES].val) /* for %s */