From: Bram Moolenaar Date: Wed, 14 Nov 2018 20:45:32 +0000 (+0100) Subject: patch 8.1.0527: using 'shiftwidth' from wrong buffer for folding X-Git-Tag: v8.1.0527 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0c27cbcacf0f58ad30f0b15d1f442f73f40347c2;p=vim patch 8.1.0527: using 'shiftwidth' from wrong buffer for folding Problem: Using 'shiftwidth' from wrong buffer for folding. Solution: Use "buf" instead of "curbuf". (Christian Brabandt) --- diff --git a/src/fold.c b/src/fold.c index bc79accb6..eb344c45b 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; diff --git a/src/version.c b/src/version.c index d3a427ae1..8a64e4a6c 100644 --- a/src/version.c +++ b/src/version.c @@ -792,6 +792,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 527, /**/ 526, /**/