fix(highlight): use winhl=Foo:Bar even when Bar is empty

fixes #22906
This commit is contained in:
bfredl
2023-04-06 10:03:37 +02:00
parent 63bffae9e0
commit 0f42aa1f2a
6 changed files with 100 additions and 14 deletions

View File

@@ -67,6 +67,15 @@
} \
} while (0)
/// Checks that actual_t is either the correct handle type or a type erased handle (integer)
#define VALIDATE_T_HANDLE(name, expected_t, actual_t, code) \
do { \
if (expected_t != actual_t && kObjectTypeInteger != actual_t) { \
api_err_exp(err, name, api_typename(expected_t), api_typename(actual_t)); \
code; \
} \
} while (0)
#define VALIDATE_RANGE(cond, name, code) \
do { \
if (!(cond)) { \