From 4c276bbd1887c09350fca4bdb355a2afde3ef471 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sat, 15 Apr 2023 13:10:36 +0800 Subject: vim-patch:8.2.0103: using null object with execute() has strange effects Problem: Using null object with execute() has strange effects. Solution: Give an error message ofr Job and Channel. https://github.com/vim/vim/commit/e2a8f0773e91685843c062b1e48259712d5f2213 Co-authored-by: Bram Moolenaar --- src/nvim/eval/typval.c | 2 +- src/nvim/globals.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'src/nvim') diff --git a/src/nvim/eval/typval.c b/src/nvim/eval/typval.c index 91be41751e..7c982de61e 100644 --- a/src/nvim/eval/typval.c +++ b/src/nvim/eval/typval.c @@ -3806,7 +3806,7 @@ static const char *const str_errors[] = { [VAR_DICT]= N_("E731: using Dictionary as a String"), [VAR_FLOAT]= e_float_as_string, [VAR_BLOB]= N_("E976: using Blob as a String"), - [VAR_UNKNOWN]= N_("E908: using an invalid value as a String"), + [VAR_UNKNOWN]= e_inval_string, }; #undef FUNC_ERROR diff --git a/src/nvim/globals.h b/src/nvim/globals.h index 7653076e39..e406d93494 100644 --- a/src/nvim/globals.h +++ b/src/nvim/globals.h @@ -998,6 +998,7 @@ EXTERN const char e_listarg[] INIT(= N_("E686: Argument of %s must be a List")); EXTERN const char e_unsupportedoption[] INIT(= N_("E519: Option not supported")); EXTERN const char e_fnametoolong[] INIT(= N_("E856: Filename too long")); EXTERN const char e_float_as_string[] INIT(= N_("E806: using Float as a String")); +EXTERN const char e_inval_string[] INIT(= N_("E908: using an invalid value as a String")); EXTERN const char e_cannot_edit_other_buf[] INIT(= N_("E788: Not allowed to edit another buffer now")); EXTERN const char e_cmdmap_err[] INIT(= N_("E5520: mapping must end with ")); -- cgit