diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-06-29 10:37:40 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-06-29 10:37:40 +0100 |
commit | c207fd2535717030d78f9b92839e5f2ac004cc78 (patch) | |
tree | d0f5a98dd1ffa989fd14e9bce0b0420b346eecb7 /src/evalfunc.c | |
parent | 75417d960bd17a5b701cfb625b8864dacaf0cc39 (diff) |
patch 9.0.0002: map functionality outside of map.cv9.0.0002
Problem: Map functionality outside of map.c.
Solution: Move f_hasmapto() to map.c. Rename a function. (closes #10611)
Diffstat (limited to 'src/evalfunc.c')
-rw-r--r-- | src/evalfunc.c | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/src/evalfunc.c b/src/evalfunc.c index cb12a46c3f..0b8fd43966 100644 --- a/src/evalfunc.c +++ b/src/evalfunc.c @@ -75,7 +75,6 @@ static void f_getregtype(typval_T *argvars, typval_T *rettv); static void f_gettagstack(typval_T *argvars, typval_T *rettv); static void f_gettext(typval_T *argvars, typval_T *rettv); static void f_haslocaldir(typval_T *argvars, typval_T *rettv); -static void f_hasmapto(typval_T *argvars, typval_T *rettv); static void f_hlID(typval_T *argvars, typval_T *rettv); static void f_hlexists(typval_T *argvars, typval_T *rettv); static void f_hostname(typval_T *argvars, typval_T *rettv); @@ -6654,40 +6653,6 @@ f_haslocaldir(typval_T *argvars, typval_T *rettv) } /* - * "hasmapto()" function - */ - static void -f_hasmapto(typval_T *argvars, typval_T *rettv) -{ - char_u *name; - char_u *mode; - char_u buf[NUMBUFLEN]; - int abbr = FALSE; - - if (in_vim9script() - && (check_for_string_arg(argvars, 0) == FAIL - || check_for_opt_string_arg(argvars, 1) == FAIL - || (argvars[1].v_type != VAR_UNKNOWN - && check_for_opt_bool_arg(argvars, 2) == FAIL))) - return; - - name = tv_get_string(&argvars[0]); - if (argvars[1].v_type == VAR_UNKNOWN) - mode = (char_u *)"nvo"; - else - { - mode = tv_get_string_buf(&argvars[1], buf); - if (argvars[2].v_type != VAR_UNKNOWN) - abbr = (int)tv_get_bool(&argvars[2]); - } - - if (map_to_exists(name, mode, abbr)) - rettv->vval.v_number = TRUE; - else - rettv->vval.v_number = FALSE; -} - -/* * "highlightID(name)" function */ static void |