diff options
Diffstat (limited to 'src/nvim/eval.c')
-rw-r--r-- | src/nvim/eval.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c index 9fe92a92cc..e99c41a915 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -2872,7 +2872,7 @@ void set_context_for_expression(expand_T *xp, char_u *arg, cmdidx_T cmdidx) int c; char_u *p; - if (cmdidx == CMD_let) { + if (cmdidx == CMD_let || cmdidx == CMD_const) { xp->xp_context = EXPAND_USER_VARS; if (vim_strpbrk(arg, (char_u *)"\"'+-*/%.=!?~|&$([<>,#") == NULL) { /* ":let var1 var2 ...": find last space. */ @@ -11503,6 +11503,9 @@ static void f_glob2regpat(typval_T *argvars, typval_T *rettv, FunPtr fptr) static void f_has(typval_T *argvars, typval_T *rettv, FunPtr fptr) { static const char *const has_list[] = { +#if defined(BSD) && !defined(__APPLE__) + "bsd", +#endif #ifdef UNIX "unix", #endif @@ -20524,7 +20527,7 @@ static hashtab_T *get_funccal_local_ht(void) return &get_funccal()->l_vars.dv_hashtab; } -/// Find the dict and hashtable used for a variable +/// Finds the dict (g:, l:, s:, …) and hashtable used for a variable. /// /// @param[in] name Variable name, possibly with scope prefix. /// @param[in] name_len Variable name length. |