foldcolumn: allow auto:X

Similar to signcolumn, allow foldcolumn to adapt itself to the number of
folds.

Regression:
vim supports a maximum fdc of 12, this limits it to 9.
This commit is contained in:
Matthieu Coudron
2020-01-14 19:50:30 +01:00
parent 49cd750d6a
commit 1a2be57da3
15 changed files with 144 additions and 44 deletions

View File

@@ -1744,7 +1744,7 @@ static int advance_color_col(int vcol, int **color_cols)
// space is available for window "wp", minus "col".
static int compute_foldcolumn(win_T *wp, int col)
{
int fdc = wp->w_p_fdc;
int fdc = win_fdccol_count(wp);
int wmw = wp == curwin && p_wmw == 0 ? 1 : p_wmw;
int wwidth = wp->w_grid.Columns;