1
0
forked from aniani/vim

patch 8.1.1922: in diff mode global operations can be very slow

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.
This commit is contained in:
Bram Moolenaar
2019-08-24 20:54:19 +02:00
parent a4208966fb
commit 4f57eefe1e
6 changed files with 21 additions and 3 deletions

View File

@@ -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);