diff src/misc2.c @ 28610:ce202d2984a0 v8.2.4829

patch 8.2.4829: a key may be simplified to NUL Commit: https://github.com/vim/vim/commit/17c95d9608370559441bb73941ba6d9a4b6b26bd Author: zeertzjq <zeertzjq@outlook.com> Date: Tue Apr 26 12:51:07 2022 +0100 patch 8.2.4829: a key may be simplified to NUL Problem: A key may be simplified to NUL. Solution: Use K_ZERO instead. Use macros instead of hard coded values. (closes #10290)
author Bram Moolenaar <Bram@vim.org>
date Tue, 26 Apr 2022 14:00:03 +0200
parents bef82285dda0
children 53c608c7ea9e
line wrap: on
line diff
--- a/src/misc2.c
+++ b/src/misc2.c
@@ -1561,7 +1561,7 @@ extract_modifiers(int key, int *modp, in
 	key = Ctrl_chr(key);
 	modifiers &= ~MOD_MASK_CTRL;
 	// <C-@> is <Nul>
-	if (key == 0)
+	if (key == NUL)
 	    key = K_ZERO;
 	if (did_simplify != NULL)
 	    *did_simplify = TRUE;