From 1a2be57da3f7e33af4e4eb3e0d36569feea71253 Mon Sep 17 00:00:00 2001 From: Matthieu Coudron Date: Tue, 14 Jan 2020 19:50:30 +0100 Subject: 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. --- src/nvim/normal.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/nvim/normal.c') diff --git a/src/nvim/normal.c b/src/nvim/normal.c index c69b10f99a..6434bd00d8 100644 --- a/src/nvim/normal.c +++ b/src/nvim/normal.c @@ -4458,16 +4458,16 @@ dozet: case 'r': curwin->w_p_fdl += cap->count1; { - int d = getDeepestNesting(); + int d = getDeepestNesting(curwin); if (curwin->w_p_fdl >= d) { curwin->w_p_fdl = d; } } break; - /* "zR": open all folds */ - case 'R': curwin->w_p_fdl = getDeepestNesting(); - old_fdl = -1; /* force an update */ + case 'R': // "zR": open all folds + curwin->w_p_fdl = getDeepestNesting(curwin); + old_fdl = -1; // force an update break; case 'j': /* "zj" move to next fold downwards */ -- cgit