patch 8.1.1321: no docs or tests for listener functions
Problem: No docs or tests for listener functions.
Solution: Add help and tests for listener_add() and listener_remove().
Invoke the callbacks before redrawing.
diff --git a/src/screen.c b/src/screen.c
index 3ebc244..5cdbd2c 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -564,6 +564,11 @@
type = 0;
}
+#ifdef FEAT_EVAL
+ // Before updating the screen, notify any listeners of changed text.
+ invoke_listeners();
+#endif
+
if (must_redraw)
{
if (type < must_redraw) /* use maximal type */