aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-10-10 23:46:34 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-10-10 23:54:51 +0800
commit2cc64dca9242ffd887ae61dd89e59d9a0ce17b98 (patch)
tree5cc398b0a626d0e4d3ca7b9caca64b0618c581e2
parent249cb8345d6e2f9986ad1dfe42d9cde0f9ed7d6a (diff)
downloadrneovim-2cc64dca9242ffd887ae61dd89e59d9a0ce17b98.tar.gz
rneovim-2cc64dca9242ffd887ae61dd89e59d9a0ce17b98.tar.bz2
rneovim-2cc64dca9242ffd887ae61dd89e59d9a0ce17b98.zip
fix: change did_emsg back to int
-rw-r--r--src/nvim/globals.h2
-rw-r--r--src/nvim/message.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/globals.h b/src/nvim/globals.h
index 1a6c639261..209caca880 100644
--- a/src/nvim/globals.h
+++ b/src/nvim/globals.h
@@ -199,7 +199,7 @@ EXTERN dict_T vimvardict; // Dictionary with v: variables
EXTERN dict_T globvardict; // Dictionary with g: variables
/// g: value
#define globvarht globvardict.dv_hashtab
-EXTERN bool did_emsg; // set by emsg() when the message
+EXTERN int did_emsg; // set by emsg() when the message
// is displayed or thrown
EXTERN bool called_vim_beep; // set if vim_beep() is called
EXTERN bool did_emsg_syntax; // did_emsg set because of a
diff --git a/src/nvim/message.c b/src/nvim/message.c
index fef5055c84..a90e675423 100644
--- a/src/nvim/message.c
+++ b/src/nvim/message.c
@@ -658,7 +658,7 @@ static bool emsg_multiline(const char *s, bool multiline)
// interrupt message).
if (cause_errthrow(s, severe, &ignore)) {
if (!ignore) {
- did_emsg = true;
+ did_emsg++;
}
return true;
}
@@ -721,7 +721,7 @@ static bool emsg_multiline(const char *s, bool multiline)
} else {
flush_buffers(FLUSH_MINIMAL); // flush internal buffers
}
- did_emsg = true; // flag for DoOneCmd()
+ did_emsg++; // flag for DoOneCmd()
}
emsg_on_display = true; // remember there is an error message