aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval.c
diff options
context:
space:
mode:
authorbfredl <bjorn.linse@gmail.com>2022-09-28 14:28:12 +0200
committerGitHub <noreply@github.com>2022-09-28 14:28:12 +0200
commit39652100558726ab5fec86153e09816b7e7bf7f5 (patch)
tree99686fac4689d460e99997c327bc7fba82a74c8f /src/nvim/eval.c
parent9ca313fb968448011aae0509e6552c52b9f8aa8c (diff)
parent4b7904d16b11915b16ea46b96f1ea6e28d87d5fd (diff)
downloadrneovim-39652100558726ab5fec86153e09816b7e7bf7f5.tar.gz
rneovim-39652100558726ab5fec86153e09816b7e7bf7f5.tar.bz2
rneovim-39652100558726ab5fec86153e09816b7e7bf7f5.zip
Merge pull request #20375 from famiu/refactor/get_option
refactor: replace unnecessary helper functions in optionstr.c
Diffstat (limited to 'src/nvim/eval.c')
-rw-r--r--src/nvim/eval.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c
index c2a7b6bba5..6eaf3d1f5e 100644
--- a/src/nvim/eval.c
+++ b/src/nvim/eval.c
@@ -3659,7 +3659,6 @@ static int eval_index(char **arg, typval_T *rettv, int evaluate, int verbose)
int get_option_tv(const char **const arg, typval_T *const rettv, const bool evaluate)
FUNC_ATTR_NONNULL_ARG(1)
{
- bool working = (**arg == '+'); // has("+option")
int opt_flags;
// Isolate the option name and find its value.
@@ -3704,10 +3703,6 @@ int get_option_tv(const char **const arg, typval_T *const rettv, const bool eval
rettv->v_type = VAR_STRING;
rettv->vval.v_string = stringval;
}
- } else if (working && (opt_type == gov_hidden_bool
- || opt_type == gov_hidden_number
- || opt_type == gov_hidden_string)) {
- ret = FAIL;
}
*option_end = c; // put back for error messages