Mercurial > vim
diff src/vim9execute.c @ 20419:d54dfb5f12db v8.2.0764
patch 8.2.0764: Vim9: assigning to option not fully tested
Commit: https://github.com/vim/vim/commit/a6e67e4f41386c3e6eab7e047671c6d32f6cb0dc
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri May 15 23:36:40 2020 +0200
patch 8.2.0764: Vim9: assigning to option not fully tested
Problem: Vim9: assigning to option not fully tested.
Solution: Add more test cases. Allow using any type for assignment.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 15 May 2020 23:45:04 +0200 |
parents | 23af9e1a5283 |
children | 0ab8f8880a33 |
line wrap: on
line diff
--- a/src/vim9execute.c +++ b/src/vim9execute.c @@ -1164,13 +1164,9 @@ call_def_function( if (s == NULL) s = (char_u *)""; } - else if (tv->v_type == VAR_NUMBER) + else + // must be VAR_NUMBER, CHECKTYPE makes sure n = tv->vval.v_number; - else - { - emsg(_("E1051: Expected string or number")); - goto failed; - } msg = set_option_value(iptr->isn_arg.storeopt.so_name, n, s, iptr->isn_arg.storeopt.so_flags); if (msg != NULL)