aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/window.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/window.c')
-rw-r--r--src/nvim/window.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/nvim/window.c b/src/nvim/window.c
index df0033a203..f61a46996d 100644
--- a/src/nvim/window.c
+++ b/src/nvim/window.c
@@ -694,18 +694,15 @@ void win_check_anchored_floats(win_T *win)
}
}
-/// Return the number of requested fold columns, based on current
-/// folds signs and on user configuration.
+/// Return the number of fold columns to display
int win_fdccol_count(win_T *wp)
{
const char *fdc = (const char *)wp->w_p_fdc;
// auto:<NUM>
if (strncmp(fdc, "auto:", 5) == 0) {
- int needed_fdccols;
- needed_fdccols = getDeepestNesting(wp);
- int maximum = fdc[5] - '0';
- return MIN(maximum, needed_fdccols);
+ int needed_fdccols = getDeepestNesting(wp);
+ return MIN(fdc[5] - '0', needed_fdccols);
} else {
return fdc[0] - '0';
}