diff options
Diffstat (limited to 'src/getchar.c')
-rw-r--r-- | src/getchar.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/getchar.c b/src/getchar.c index 93d0d64ee..1056e938e 100644 --- a/src/getchar.c +++ b/src/getchar.c @@ -933,7 +933,7 @@ ins_typebuf( init_typebuf(); if (++typebuf.tb_change_cnt == 0) typebuf.tb_change_cnt = 1; - state_no_longer_safe(); + state_no_longer_safe("ins_typebuf()"); addlen = (int)STRLEN(str); @@ -1797,7 +1797,7 @@ vgetc(void) // Need to process the character before we know it's safe to do something // else. if (c != K_IGNORE) - state_no_longer_safe(); + state_no_longer_safe("key typed"); return c; } @@ -2047,6 +2047,7 @@ parse_queued_messages(void) int i; int save_may_garbage_collect = may_garbage_collect; static int entered = 0; + int was_safe = get_was_safe_state(); // Do not handle messages while redrawing, because it may cause buffers to // change or be wiped while they are being redrawn. @@ -2102,7 +2103,7 @@ parse_queued_messages(void) // When not nested we'll go back to waiting for a typed character. If it // was safe before then this triggers a SafeStateAgain autocommand event. - if (entered == 1) + if (entered == 1 && was_safe) may_trigger_safestateagain(); may_garbage_collect = save_may_garbage_collect; |