Mercurial > vim
diff src/main.c @ 18160:770987511384 v8.1.2075
patch 8.1.2075: get many log messages when waiting for a typed character
Commit: https://github.com/vim/vim/commit/101e99207f813ca48a4c0787eed9eb8bf67fba5a
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Sep 25 21:43:11 2019 +0200
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.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 25 Sep 2019 21:45:03 +0200 |
parents | 59bc3cd42cf5 |
children | 506bf60a30a0 |
line wrap: on
line diff
--- a/src/main.c +++ b/src/main.c @@ -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); }