0
0
mirror of https://github.com/vim/vim.git synced 2025-09-30 04:44:14 -04:00

patch 8.1.2075: get many log messages when waiting for a typed character

Problem:    Get many log messages when waiting for a typed character.
Solution:   Do not repeat the repeated messages when nothing happens.
This commit is contained in:
Bram Moolenaar
2019-09-25 21:43:11 +02:00
parent 0d0c3ca007
commit 101e99207f
4 changed files with 24 additions and 8 deletions

View File

@@ -1122,7 +1122,16 @@ may_trigger_safestateagain(void)
if (was_safe)
{
#ifdef FEAT_JOB_CHANNEL
ch_log(NULL, "SafeState: back to waiting, triggering SafeStateAgain");
// Only do this message when another message was given, otherwise we
// get lots of them.
if ((did_repeated_msg & REPEATED_MSG_SAFESTATE) == 0)
{
int did = did_repeated_msg;
ch_log(NULL,
"SafeState: back to waiting, triggering SafeStateAgain");
did_repeated_msg = did | REPEATED_MSG_SAFESTATE;
}
#endif
apply_autocmds(EVENT_SAFESTATEAGAIN, NULL, NULL, FALSE, curbuf);
}