summaryrefslogtreecommitdiffstats
path: root/src/fold.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-11-14 21:45:32 +0100
committerBram Moolenaar <Bram@vim.org>2018-11-14 21:45:32 +0100
commit0c27cbcacf0f58ad30f0b15d1f442f73f40347c2 (patch)
tree8b6a0e0bfc52c60785354476e27341d4e99bbfdf /src/fold.c
parent61fb8d8c6719205c686550e591db22aa97b4db4c (diff)
patch 8.1.0527: using 'shiftwidth' from wrong buffer for foldingv8.1.0527
Problem: Using 'shiftwidth' from wrong buffer for folding. Solution: Use "buf" instead of "curbuf". (Christian Brabandt)
Diffstat (limited to 'src/fold.c')
-rw-r--r--src/fold.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/fold.c b/src/fold.c
index bc79accb66..eb344c45bb 100644
--- a/src/fold.c
+++ b/src/fold.c
@@ -155,6 +155,7 @@ hasFoldingWin(
int low_level = 0;
checkupdate(win);
+
/*
* Return quickly when there is no folding at all in this window.
*/
@@ -3219,7 +3220,7 @@ foldlevelIndent(fline_T *flp)
flp->lvl = -1;
}
else
- flp->lvl = get_indent_buf(buf, lnum) / get_sw_value(curbuf);
+ flp->lvl = get_indent_buf(buf, lnum) / get_sw_value(buf);
if (flp->lvl > flp->wp->w_p_fdn)
{
flp->lvl = flp->wp->w_p_fdn;