Mercurial > vim
changeset 15031:03831e5ea0de v8.1.0527
patch 8.1.0527: using 'shiftwidth' from wrong buffer for folding
commit https://github.com/vim/vim/commit/0c27cbcacf0f58ad30f0b15d1f442f73f40347c2
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Nov 14 21:45:32 2018 +0100
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)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 14 Nov 2018 22:00:06 +0100 |
parents | 3a33febf426b |
children | 4b3b0ea9b09d |
files | src/fold.c src/version.c |
diffstat | 2 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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;