summaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index bf9b842f54..8ee165003d 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1200,6 +1200,15 @@ main_loop(
}
#if defined(FEAT_DIFF)
+ // Updating diffs from changed() does not always work properly,
+ // esp. updating folds. Do an update just before redrawing if
+ // needed.
+ if (curtab->tp_diff_update || curtab->tp_diff_invalid)
+ {
+ ex_diffupdate(NULL);
+ curtab->tp_diff_update = FALSE;
+ }
+
/* Scroll-binding for diff mode may have been postponed until
* here. Avoids doing it for every change. */
if (diff_need_scrollbind)