summaryrefslogtreecommitdiff
path: root/src/screen.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/screen.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/screen.c')
-rw-r--r--src/screen.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/screen.c b/src/screen.c
index 5043c0d7f..1681e1c57 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -567,6 +567,12 @@ update_screen(int type_arg)
}
#endif
+#ifdef FEAT_DIFF
+ // May have postponed updating diffs.
+ if (need_diff_redraw)
+ diff_redraw(TRUE);
+#endif
+
if (must_redraw)
{
if (type < must_redraw) /* use maximal type */