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.
4f57eefe1e
This commit is contained in:
Jan Edmund Lazo
2019-11-16 12:31:46 -05:00
parent d3ef88db63
commit 7274f5c177
4 changed files with 15 additions and 2 deletions

View File

@@ -771,6 +771,11 @@ void foldUpdate(win_T *wp, linenr_T top, linenr_T bot)
return;
}
if (need_diff_redraw) {
// will update later
return;
}
// Mark all folds from top to bot as maybe-small.
fold_T *fp;
(void)foldFind(&wp->w_folds, top, &fp);