diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2018-11-14 20:10:05 -0500 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2018-11-15 02:10:05 +0100 |
commit | f6ed446817480a0356294f9abc17c138605816e9 (patch) | |
tree | 6b9ab01fccb03f5a1f25f21fde336a08a74d8917 /src | |
parent | e14fa8569cea4164bb4953a0368a94686fbd47e5 (diff) | |
download | rneovim-f6ed446817480a0356294f9abc17c138605816e9.tar.gz rneovim-f6ed446817480a0356294f9abc17c138605816e9.tar.bz2 rneovim-f6ed446817480a0356294f9abc17c138605816e9.zip |
vim-patch:8.1.0527: using 'shiftwidth' from wrong buffer for folding (#9234)
Problem: Using 'shiftwidth' from wrong buffer for folding.
Solution: Use "buf" instead of "curbuf". (Christian Brabandt)
https://github.com/vim/vim/commit/0c27cbcacf0f58ad30f0b15d1f442f73f40347c2
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/fold.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nvim/fold.c b/src/nvim/fold.c index 53a3218c51..39975308d7 100644 --- a/src/nvim/fold.c +++ b/src/nvim/fold.c @@ -171,9 +171,8 @@ bool hasFoldingWin( int low_level = 0; checkupdate(win); - /* - * Return quickly when there is no folding at all in this window. - */ + + // Return quickly when there is no folding at all in this window. if (!hasAnyFolding(win)) { if (infop != NULL) infop->fi_level = 0; @@ -2851,8 +2850,9 @@ static void foldlevelIndent(fline_T *flp) flp->lvl = 0; else flp->lvl = -1; - } else - flp->lvl = get_indent_buf(buf, lnum) / get_sw_value(curbuf); + } else { + flp->lvl = get_indent_buf(buf, lnum) / get_sw_value(buf); + } if (flp->lvl > flp->wp->w_p_fdn) { flp->lvl = (int) MAX(0, flp->wp->w_p_fdn); } |