patch 8.1.2046: SafeState may be triggered at the wrong moment
Problem: SafeState may be triggered at the wrong moment.
Solution: Move it up higher to after where messages are processed. Add a
SafeStateAgain event to tigger there.
diff --git a/src/proto/main.pro b/src/proto/main.pro
index a6b9784..2c07cea 100644
--- a/src/proto/main.pro
+++ b/src/proto/main.pro
@@ -3,7 +3,7 @@
void common_init(mparm_T *paramp);
int is_not_a_term(void);
void may_trigger_safestate(int safe);
-void enter_unsafe_state(void);
+void state_no_longer_safe(void);
void leave_unsafe_state(void);
void main_loop(int cmdwin, int noexmode);
void getout_preserve_modified(int exitval);