patch 8.1.2053: SafeStateAgain not triggered if callback uses feedkeys()
Problem: SafeStateAgain not triggered if callback uses feedkeys().
Solution: Check for safe state in the input loop. Make log messages easier
to find. Add 'S' flag to state().
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 7806120..0621966 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -9060,7 +9060,8 @@
added. E.g, this checks if the screen has scrolled: >
if state('s') != ''
<
- These characters indicate the state:
+ These characters indicate the state, generally indicating that
+ something is busy:
m halfway a mapping, :normal command, feedkeys() or
stuffed command
o operator pending or waiting for a command argument
@@ -9068,7 +9069,9 @@
x executing an autocommand
w blocked on waiting, e.g. ch_evalexpr() and
ch_read(), ch_readraw() when reading json.
- c callback invoked (repeats for recursiveness up to "ccc")
+ S not triggering SafeState or SafeStateAgain
+ c callback invoked, including timer (repeats for
+ recursiveness up to "ccc")
s screen has scrolled for messages
str2float({expr}) *str2float()*