aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/normal.c
diff options
context:
space:
mode:
authorMatthieu Coudron <mattator@gmail.com>2020-01-14 19:50:30 +0100
committerMatthieu Coudron <mattator@gmail.com>2020-02-29 20:27:22 +0100
commit1a2be57da3f7e33af4e4eb3e0d36569feea71253 (patch)
treee38b97171e9539644e2be9eb36f02f17be2d13ee /src/nvim/normal.c
parent49cd750d6a72efc0571a89d7a874bbb01081227f (diff)
downloadrneovim-1a2be57da3f7e33af4e4eb3e0d36569feea71253.tar.gz
rneovim-1a2be57da3f7e33af4e4eb3e0d36569feea71253.tar.bz2
rneovim-1a2be57da3f7e33af4e4eb3e0d36569feea71253.zip
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.
Diffstat (limited to 'src/nvim/normal.c')
-rw-r--r--src/nvim/normal.c8
1 files changed, 4 insertions, 4 deletions
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 */