diff src/globals.h @ 23102:3239b0f3c592 v8.2.2097

patch 8.2.2097: Vim9: using :silent! when calling a function prevents abort Commit: https://github.com/vim/vim/commit/56602ba153af7130b76daf83933922aaea3e2646 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Dec 5 21:22:08 2020 +0100 patch 8.2.2097: Vim9: using :silent! when calling a function prevents abort Problem: Vim9: using :silent! when calling a function prevents abortng that function. Solution: Add emsg_silent_def and did_emsg_def.
author Bram Moolenaar <Bram@vim.org>
date Sat, 05 Dec 2020 21:30:03 +0100
parents 707b90980de5
children a84e7abb0c92
line wrap: on
line diff
--- a/src/globals.h
+++ b/src/globals.h
@@ -230,6 +230,8 @@ EXTERN int	did_endif INIT(= FALSE);    /
 EXTERN int	did_emsg;		    // set by emsg() when the message
 					    // is displayed or thrown
 #ifdef FEAT_EVAL
+EXTERN int	did_emsg_def;		    // set by emsg() when emsg_silent
+					    // is set before calling a function
 EXTERN int	did_emsg_cumul;		    // cumulative did_emsg, increased
 					    // when did_emsg is reset.
 EXTERN int	called_vim_beep;	    // set if vim_beep() is called
@@ -1134,6 +1136,10 @@ EXTERN int	is_export INIT(= FALSE);    /
 
 EXTERN int	msg_silent INIT(= 0);	// don't print messages
 EXTERN int	emsg_silent INIT(= 0);	// don't print error messages
+#ifdef FEAT_EVAL
+EXTERN int	emsg_silent_def INIT(= 0);  // value of emsg_silent when a :def
+					    // function is called
+#endif
 EXTERN int	emsg_noredir INIT(= 0);	// don't redirect error messages
 EXTERN int	cmd_silent INIT(= FALSE); // don't echo the command line