aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/fold.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2018-12-27 22:49:44 +0100
committerJustin M. Keyes <justinkz@gmail.com>2018-12-27 22:49:44 +0100
commitc1015121ec626cab6cb384f544bc0be1a1760c0e (patch)
tree6cc9a5d1899a4486a24c491e07d17a7dd01f9503 /src/nvim/fold.c
parent4f030ec24e0e148bbb83aedaef7dd629e5fef130 (diff)
parente1876c7ad1b5e30c0a9919e2c4587d11550c8507 (diff)
downloadrneovim-c1015121ec626cab6cb384f544bc0be1a1760c0e.tar.gz
rneovim-c1015121ec626cab6cb384f544bc0be1a1760c0e.tar.bz2
rneovim-c1015121ec626cab6cb384f544bc0be1a1760c0e.zip
Merge 'upstream/master' into pr-win-erw7
Diffstat (limited to 'src/nvim/fold.c')
-rw-r--r--src/nvim/fold.c10
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);
}