feat(api): add nvim_get_option_value

This commit is contained in:
Gregory Anders
2021-10-11 22:09:08 -06:00
parent 7b910a1716
commit 71ac00ccb5
9 changed files with 193 additions and 121 deletions

View File

@@ -4828,7 +4828,7 @@ int get_option_tv(const char **const arg, typval_T *const rettv, const bool eval
} else if (opt_type == -1) { // hidden number option
rettv->v_type = VAR_NUMBER;
rettv->vval.v_number = 0;
} else if (opt_type == 1) { // number option
} else if (opt_type == 1 || opt_type == 2) { // number or boolean option
rettv->v_type = VAR_NUMBER;
rettv->vval.v_number = numval;
} else { // string option