aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/edit.c
diff options
context:
space:
mode:
authorShougo Matsushita <Shougo.Matsu@gmail.com>2016-09-17 07:40:00 +0900
committerJustin M. Keyes <justinkz@gmail.com>2016-09-18 13:40:50 +0200
commite1079c2a289de18923950338ea08ee80c01cc6cf (patch)
treefb12eb431b1377b7c6d94d2ed0124e0266378d9a /src/nvim/edit.c
parent19b47b043de2628d7ace4d65aaf124b225ed7351 (diff)
downloadrneovim-e1079c2a289de18923950338ea08ee80c01cc6cf.tar.gz
rneovim-e1079c2a289de18923950338ea08ee80c01cc6cf.tar.bz2
rneovim-e1079c2a289de18923950338ea08ee80c01cc6cf.zip
insert_enter: Update folds on insert-leave. #5351
Fixes failing test: 045_folding_spec.lua References #5299
Diffstat (limited to 'src/nvim/edit.c')
-rw-r--r--src/nvim/edit.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/nvim/edit.c b/src/nvim/edit.c
index ff1107db6c..18d5ea533d 100644
--- a/src/nvim/edit.c
+++ b/src/nvim/edit.c
@@ -462,6 +462,8 @@ static void insert_enter(InsertState *s)
o_lnum = curwin->w_cursor.lnum;
}
+ foldUpdateAll(curwin);
+ foldOpenCursor();
if (s->cmdchar != 'r' && s->cmdchar != 'v') {
apply_autocmds(EVENT_INSERTLEAVE, NULL, NULL, false, curbuf);
}