refactor(highlight): make enum of builtin highlights start with 1

This makes it possible to use HLF_ values directly as highlight id:s
and avoids +1 adjustments especially around messages.
This commit is contained in:
bfredl
2024-11-11 13:06:37 +01:00
parent eaf5ae6cc6
commit ff7518b83c
35 changed files with 113 additions and 112 deletions

View File

@@ -1342,7 +1342,7 @@ static void f_diff_hlID(typval_T *argvars, typval_T *rettv, EvalFuncData fptr)
hlID = HLF_CHD; // Changed line.
}
}
rettv->vval.v_number = hlID == (hlf_T)0 ? 0 : (hlID + 1);
rettv->vval.v_number = hlID;
}
/// "empty({expr})" function