aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_eval.c
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2024-11-19 22:57:13 +0000
committerJosh Rahm <joshuarahm@gmail.com>2024-11-19 22:57:13 +0000
commit9be89f131f87608f224f0ee06d199fcd09d32176 (patch)
tree11022dcfa9e08cb4ac5581b16734196128688d48 /src/nvim/ex_eval.c
parentff7ed8f586589d620a806c3758fac4a47a8e7e15 (diff)
parent88085c2e80a7e3ac29aabb6b5420377eed99b8b6 (diff)
downloadrneovim-9be89f131f87608f224f0ee06d199fcd09d32176.tar.gz
rneovim-9be89f131f87608f224f0ee06d199fcd09d32176.tar.bz2
rneovim-9be89f131f87608f224f0ee06d199fcd09d32176.zip
Merge remote-tracking branch 'upstream/master' into mix_20240309
Diffstat (limited to 'src/nvim/ex_eval.c')
-rw-r--r--src/nvim/ex_eval.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/nvim/ex_eval.c b/src/nvim/ex_eval.c
index 472741d537..f9936dd88e 100644
--- a/src/nvim/ex_eval.c
+++ b/src/nvim/ex_eval.c
@@ -11,6 +11,7 @@
#include "nvim/ascii_defs.h"
#include "nvim/charset.h"
#include "nvim/debugger.h"
+#include "nvim/errors.h"
#include "nvim/eval.h"
#include "nvim/eval/typval.h"
#include "nvim/eval/typval_defs.h"
@@ -405,7 +406,7 @@ char *get_exception_string(void *value, except_type_T type, char *cmdname, bool
|| (ascii_isdigit(p[3])
&& p[4] == ':')))))) {
if (*p == NUL || p == mesg) {
- STRCAT(val, mesg); // 'E123' missing or at beginning
+ strcat(val, mesg); // 'E123' missing or at beginning
} else {
// '"filename" E123: message text'
if (mesg[0] != '"' || p - 2 < &mesg[1]
@@ -414,7 +415,7 @@ char *get_exception_string(void *value, except_type_T type, char *cmdname, bool
continue;
}
- STRCAT(val, p);
+ strcat(val, p);
p[-2] = NUL;
snprintf(val + strlen(p), strlen(" (%s)"), " (%s)", &mesg[1]);
p[-2] = '"';
@@ -848,7 +849,7 @@ void ex_if(exarg_T *eap)
bool skip = CHECK_SKIP;
bool error;
- bool result = eval_to_bool(eap->arg, &error, eap, skip);
+ bool result = eval_to_bool(eap->arg, &error, eap, skip, false);
if (!skip && !error) {
if (result) {
@@ -943,7 +944,7 @@ void ex_else(exarg_T *eap)
if (skip && *eap->arg != '"' && ends_excmd(*eap->arg)) {
semsg(_(e_invexpr2), eap->arg);
} else {
- result = eval_to_bool(eap->arg, &error, eap, skip);
+ result = eval_to_bool(eap->arg, &error, eap, skip, false);
}
// When throwing error exceptions, we want to throw always the first
@@ -989,7 +990,7 @@ void ex_while(exarg_T *eap)
int skip = CHECK_SKIP;
if (eap->cmdidx == CMD_while) { // ":while bool-expr"
- result = eval_to_bool(eap->arg, &error, eap, skip);
+ result = eval_to_bool(eap->arg, &error, eap, skip, false);
} else { // ":for var in list-expr"
evalarg_T evalarg;
fill_evalarg_from_eap(&evalarg, eap, skip);