patch 8.2.4379: an empty change is reported to a listener
Problem: An empty change is reported to a listener.
Solution: Do not report an empty change. (closes #9768) Remove unused
return value.
diff --git a/src/undo.c b/src/undo.c
index 1ed720c..1a4f6d0 100644
--- a/src/undo.c
+++ b/src/undo.c
@@ -2828,8 +2828,8 @@
if (curbuf->b_op_end.lnum > top + oldsize)
curbuf->b_op_end.lnum += newsize - oldsize;
}
-
- changed_lines(top + 1, 0, bot, newsize - oldsize);
+ if (oldsize > 0 || newsize > 0)
+ changed_lines(top + 1, 0, bot, newsize - oldsize);
// set '[ and '] mark
if (top + 1 < curbuf->b_op_start.lnum)