diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2016-07-18 11:22:43 -0400 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2016-07-18 11:22:43 -0400 |
commit | 77937c4edd0e559ec66811ea20b103c329627a83 (patch) | |
tree | 7da1dec833786ea544ee4bd60c0767e6dae66dab /src/nvim/eval.c | |
parent | 1d8a07615714345769e6932850b83b180e697008 (diff) | |
parent | 9c3bd3e427686855a8e75403d1715dd4b99ffa8a (diff) | |
download | rneovim-77937c4edd0e559ec66811ea20b103c329627a83.tar.gz rneovim-77937c4edd0e559ec66811ea20b103c329627a83.tar.bz2 rneovim-77937c4edd0e559ec66811ea20b103c329627a83.zip |
Merge #5058
Diffstat (limited to 'src/nvim/eval.c')
-rw-r--r-- | src/nvim/eval.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c index 47d44b148a..a43a389478 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -18886,19 +18886,6 @@ set_var ( || tv_check_lock(v->di_tv.v_lock, name, false)) { return; } - if (v->di_tv.v_type != tv->v_type - && !((v->di_tv.v_type == VAR_STRING - || v->di_tv.v_type == VAR_NUMBER) - && (tv->v_type == VAR_STRING - || tv->v_type == VAR_NUMBER)) - && !((v->di_tv.v_type == VAR_NUMBER - || v->di_tv.v_type == VAR_FLOAT) - && (tv->v_type == VAR_NUMBER - || tv->v_type == VAR_FLOAT)) - ) { - EMSG2(_("E706: Variable type mismatch for: %s"), name); - return; - } // Handle setting internal v: variables separately where needed to // prevent changing the type. @@ -18908,7 +18895,7 @@ set_var ( if (copy || tv->v_type != VAR_STRING) v->di_tv.vval.v_string = vim_strsave(get_tv_string(tv)); else { - /* Take over the string to avoid an extra alloc/free. */ + // Take over the string to avoid an extra alloc/free. v->di_tv.vval.v_string = tv->vval.v_string; tv->vval.v_string = NULL; } |