patch 8.0.1817: a timer may change v:count unexpectedly
Problem: A timer may change v:count unexpectedly.
Solution: Save and restore v:count and similar variables when a timer
callback is invoked. (closes #2897)
diff --git a/src/structs.h b/src/structs.h
index 8f35a73..5c4a74c 100644
--- a/src/structs.h
+++ b/src/structs.h
@@ -3423,3 +3423,9 @@
int save_opcount;
tasave_T tabuf;
} save_state_T;
+
+typedef struct {
+ varnumber_T vv_prevcount;
+ varnumber_T vv_count;
+ varnumber_T vv_count1;
+} vimvars_save_T;