diff src/message.c @ 12375:ab0d827151a1 v8.0.1067

patch 8.0.1067: try/catch in timer does not prevent it from being stopped commit https://github.com/vim/vim/commit/e723c42836d971180d1bf9f98916966c5543fff1 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Sep 6 23:40:10 2017 +0200 patch 8.0.1067: try/catch in timer does not prevent it from being stopped Problem: Using try/catch in timer does not prevent it from being stopped. Solution: Reset the exception context and use did_emsg instead of called_emsg.
author Christian Brabandt <cb@256bit.org>
date Wed, 06 Sep 2017 23:45:04 +0200
parents 69af108df70e
children e769c912fcd9
line wrap: on
line diff
--- a/src/message.c
+++ b/src/message.c
@@ -609,11 +609,9 @@ emsg(char_u *s)
 
     called_emsg = TRUE;
 
-    /*
-     * If "emsg_severe" is TRUE: When an error exception is to be thrown,
-     * prefer this message over previous messages for the same command.
-     */
 #ifdef FEAT_EVAL
+    /* If "emsg_severe" is TRUE: When an error exception is to be thrown,
+     * prefer this message over previous messages for the same command. */
     severe = emsg_severe;
     emsg_severe = FALSE;
 #endif
@@ -684,6 +682,9 @@ emsg(char_u *s)
 	else
 	    flush_buffers(FALSE);	/* flush internal buffers */
 	did_emsg = TRUE;		/* flag for DoOneCmd() */
+#ifdef FEAT_EVAL
+	did_uncaught_emsg = TRUE;
+#endif
     }
 
     emsg_on_display = TRUE;	/* remember there is an error message */