summaryrefslogtreecommitdiff
path: root/src/fold.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-08-24 20:54:19 +0200
committerBram Moolenaar <Bram@vim.org>2019-08-24 20:54:19 +0200
commit4f57eefe1e84b5a90e08474092ea6fc8825ad5c9 (patch)
tree5afd78a40e21a0375a423acbf3ef990e32ac0cd6 /src/fold.c
parenta4208966fb289a505ebdef62bbc37c214069bab4 (diff)
downloadvim-git-4f57eefe1e84b5a90e08474092ea6fc8825ad5c9.tar.gz
patch 8.1.1922: in diff mode global operations can be very slowv8.1.1922
Problem: In diff mode global operations can be very slow. Solution: Do not call diff_redraw() many times, call it once when redrawing. And also don't update folds multiple times.
Diffstat (limited to 'src/fold.c')
-rw-r--r--src/fold.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/fold.c b/src/fold.c
index 482d3c968..6200578fc 100644
--- a/src/fold.c
+++ b/src/fold.c
@@ -813,6 +813,11 @@ foldUpdate(win_T *wp, linenr_T top, linenr_T bot)
if (disable_fold_update > 0)
return;
+#ifdef FEAT_DIFF
+ if (need_diff_redraw)
+ // will update later
+ return;
+#endif
/* Mark all folds from top to bot as maybe-small. */
(void)foldFind(&wp->w_folds, top, &fp);