aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/globals.h
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-11-11 17:50:52 +0800
committerGitHub <noreply@github.com>2022-11-11 17:50:52 +0800
commit0d8e8d36ec7d3f4967f27389b4b94edf3ba57433 (patch)
tree94f62c40fbb8714ab4f811682e450fd8d7affd68 /src/nvim/globals.h
parentfc7ac688c397b5f748920597fcc70fe46e907944 (diff)
downloadrneovim-0d8e8d36ec7d3f4967f27389b4b94edf3ba57433.tar.gz
rneovim-0d8e8d36ec7d3f4967f27389b4b94edf3ba57433.tar.bz2
rneovim-0d8e8d36ec7d3f4967f27389b4b94edf3ba57433.zip
vim-patch:8.2.1919: assert_fails() setting emsg_silent changes normal execution (#20998)
Problem: Assert_fails() setting emsg_silent changes normal execution. Solution: Use a separate flag in_assert_fails. https://github.com/vim/vim/commit/28ee892ac4197421b3317f195512ca64cc56a5b4 Cherry-pick no_wait_return from patch 9.0.0846. Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'src/nvim/globals.h')
-rw-r--r--src/nvim/globals.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nvim/globals.h b/src/nvim/globals.h
index 14266fc859..76f62fe267 100644
--- a/src/nvim/globals.h
+++ b/src/nvim/globals.h
@@ -195,7 +195,6 @@ EXTERN int emsg_skip INIT(= 0); // don't display errors for
EXTERN bool emsg_severe INIT(= false); // use message of next of several
// emsg() calls for throw
// used by assert_fails()
-EXTERN bool emsg_assert_fails_used INIT(= false);
EXTERN char *emsg_assert_fails_msg INIT(= NULL);
EXTERN long emsg_assert_fails_lnum INIT(= 0);
EXTERN char *emsg_assert_fails_context INIT(= NULL);
@@ -667,6 +666,8 @@ EXTERN int emsg_silent INIT(= 0); // don't print error messages
EXTERN bool emsg_noredir INIT(= false); // don't redirect error messages
EXTERN bool cmd_silent INIT(= false); // don't echo the command line
+EXTERN bool in_assert_fails INIT(= false); // assert_fails() active
+
// Values for swap_exists_action: what to do when swap file already exists
#define SEA_NONE 0 // don't use dialog
#define SEA_DIALOG 1 // use dialog when possible