diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/normal.c | 18 | ||||
-rw-r--r-- | src/nvim/version.c | 2 |
2 files changed, 16 insertions, 4 deletions
diff --git a/src/nvim/normal.c b/src/nvim/normal.c index de575c0234..fce3558e9f 100644 --- a/src/nvim/normal.c +++ b/src/nvim/normal.c @@ -4253,8 +4253,13 @@ dozet: break; /* "zm": fold more */ - case 'm': if (curwin->w_p_fdl > 0) - --curwin->w_p_fdl; + case 'm': + if (curwin->w_p_fdl > 0) { + curwin->w_p_fdl -= cap->count1; + if (curwin->w_p_fdl < 0) { + curwin->w_p_fdl = 0; + } + } old_fdl = -1; /* force an update */ curwin->w_p_fen = true; break; @@ -4266,7 +4271,14 @@ dozet: break; /* "zr": reduce folding */ - case 'r': ++curwin->w_p_fdl; + case 'r': + curwin->w_p_fdl += cap->count1; + { + int d = getDeepestNesting(); + if (curwin->w_p_fdl >= d) { + curwin->w_p_fdl = d; + } + } break; /* "zR": open all folds */ diff --git a/src/nvim/version.c b/src/nvim/version.c index 5a0f7d524d..6485195472 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -238,7 +238,7 @@ static int included_patches[] = { // 689, // 688, // 687 NA - // 686, + 686, // 685, // 684, // 683 NA |