summaryrefslogtreecommitdiff
path: root/src/fold.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fold.c')
-rw-r--r--src/fold.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/fold.c b/src/fold.c
index 1aee87ce2..bb268fb25 100644
--- a/src/fold.c
+++ b/src/fold.c
@@ -902,6 +902,8 @@ foldMoveTo(updown, dir, count)
int level;
int last;
+ checkupdate(curwin);
+
/* Repeat "count" times. */
for (n = 0; n < count; ++n)
{
@@ -2883,7 +2885,7 @@ foldRemove(gap, top, bot)
{
/* Found an entry below top. */
fold_changed = TRUE;
- if (fp->fd_top + fp->fd_len > bot)
+ if (fp->fd_top + fp->fd_len - 1 > bot)
{
/* 5: Make fold that includes bot start below bot. */
foldMarkAdjustRecurse(&fp->fd_nested,