aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/getchar.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-10-01 06:27:30 +0800
committerGitHub <noreply@github.com>2024-10-01 06:27:30 +0800
commite0efbc6e03f1d64e49805bb9be7d41ff9a27569f (patch)
treef1fe02c1e071dd55f690e68a462ee4fd4b9b9bea /src/nvim/getchar.c
parent888966652d2421788f01f9371fa58ddcce08167b (diff)
downloadrneovim-e0efbc6e03f1d64e49805bb9be7d41ff9a27569f.tar.gz
rneovim-e0efbc6e03f1d64e49805bb9be7d41ff9a27569f.tar.bz2
rneovim-e0efbc6e03f1d64e49805bb9be7d41ff9a27569f.zip
refactor: use ERROR_SET() to check for error (#30594)
Replaces the only two places where kErrorTypeNone is checked explicitly.
Diffstat (limited to 'src/nvim/getchar.c')
-rw-r--r--src/nvim/getchar.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/getchar.c b/src/nvim/getchar.c
index 8c3ac49adf..472bc3a850 100644
--- a/src/nvim/getchar.c
+++ b/src/nvim/getchar.c
@@ -3181,7 +3181,7 @@ bool map_execute_lua(bool may_repeat)
Error err = ERROR_INIT;
Array args = ARRAY_DICT_INIT;
nlua_call_ref(ref, NULL, args, kRetNilBool, NULL, &err);
- if (err.type != kErrorTypeNone) {
+ if (ERROR_SET(&err)) {
semsg_multiline("E5108: %s", err.msg);
api_clear_error(&err);
}