summaryrefslogtreecommitdiffstats
path: root/src/userfunc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/userfunc.c')
-rw-r--r--src/userfunc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/userfunc.c b/src/userfunc.c
index 6f0d59dfd3..5b2c876e3b 100644
--- a/src/userfunc.c
+++ b/src/userfunc.c
@@ -3048,7 +3048,8 @@ call_user_func(
// Invoke functions added with ":defer".
handle_defer_one(current_funccal);
- --RedrawingDisabled;
+ if (RedrawingDisabled > 0)
+ --RedrawingDisabled;
// when the function was aborted because of an error, return -1
if ((did_emsg && (fp->uf_flags & FC_ABORT)) || rettv->v_type == VAR_UNKNOWN)