diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/edit.c | 2 | ||||
-rw-r--r-- | src/nvim/fold.c | 6 | ||||
-rw-r--r-- | src/nvim/normal.c | 3 |
3 files changed, 6 insertions, 5 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); } diff --git a/src/nvim/fold.c b/src/nvim/fold.c index a92ee86248..70030b8525 100644 --- a/src/nvim/fold.c +++ b/src/nvim/fold.c @@ -765,12 +765,8 @@ void foldUpdate(win_T *wp, linenr_T top, linenr_T bot) return; } - fold_T *fp; - if (wp->w_buffer->terminal) { - return; - } - // Mark all folds from top to bot as maybe-small. + fold_T *fp; (void)foldFind(&wp->w_folds, top, &fp); while (fp < (fold_T *)wp->w_folds.ga_data + wp->w_folds.ga_len && fp->fd_top < bot) { diff --git a/src/nvim/normal.c b/src/nvim/normal.c index 68ba9e399f..d0a9d3aca7 100644 --- a/src/nvim/normal.c +++ b/src/nvim/normal.c @@ -5924,6 +5924,9 @@ static void nv_replace(cmdarg_T *cap) curwin->w_set_curswant = true; set_last_insert(cap->nchar); } + + foldUpdateAll(curwin); + foldOpenCursor(); } /* |