summaryrefslogtreecommitdiff
path: root/src/fold.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2009-11-03 15:30:12 +0000
committerBram Moolenaar <Bram@vim.org>2009-11-03 15:30:12 +0000
commit5b88ba47e818130b3499278c176e8921de8fc550 (patch)
tree4934f34db901aefb2f1667659c15586078534f66 /src/fold.c
parentfa316dd1f710f446c820aab3b11cfc99c6e56f30 (diff)
downloadvim-git-5b88ba47e818130b3499278c176e8921de8fc550.tar.gz
updated for version 7.2-278v7.2.278
Diffstat (limited to 'src/fold.c')
-rw-r--r--src/fold.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/fold.c b/src/fold.c
index f3be3788d..5f89de826 100644
--- a/src/fold.c
+++ b/src/fold.c
@@ -1932,7 +1932,7 @@ get_foldtext(wp, lnum, lnume, foldinfo, buf)
#ifdef FEAT_EVAL
if (*wp->w_p_fdt != NUL)
{
- char_u dashes[51];
+ char_u dashes[MAX_LEVEL + 2];
win_T *save_curwin;
int level;
char_u *p;
@@ -1944,8 +1944,8 @@ get_foldtext(wp, lnum, lnume, foldinfo, buf)
/* Set "v:folddashes" to a string of "level" dashes. */
/* Set "v:foldlevel" to "level". */
level = foldinfo->fi_level;
- if (level > 50)
- level = 50;
+ if (level > (int)sizeof(dashes) - 1)
+ level = (int)sizeof(dashes) - 1;
vim_memset(dashes, '-', (size_t)level);
dashes[level] = NUL;
set_vim_var_string(VV_FOLDDASHES, dashes, -1);