diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2014-12-24 00:53:00 -0500 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2014-12-24 00:53:00 -0500 |
commit | 59985523b851fe61b62afcef69f4564f064cbc0a (patch) | |
tree | 3189b1c5c9ee44748660d0eff0c05e2934448f06 /src/nvim/eval.c | |
parent | 11a3eba72c2a527aab48ba553165e71d6d9507fa (diff) | |
parent | 05b2f01f6aee203faa08dbfa59cd19685dc6d710 (diff) | |
download | rneovim-59985523b851fe61b62afcef69f4564f064cbc0a.tar.gz rneovim-59985523b851fe61b62afcef69f4564f064cbc0a.tar.bz2 rneovim-59985523b851fe61b62afcef69f4564f064cbc0a.zip |
Merge pull request #1732 from fwalch/small-patches
vim-patch: Small patches (3)
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 67a68f70d5..116944b28d 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -2580,10 +2580,10 @@ void set_context_for_expression(expand_T *xp, char_u *arg, cmdidx_T cmdidx) } else if (c == '=') { got_eq = TRUE; xp->xp_context = EXPAND_EXPRESSION; - } else if (c == '<' + } else if ((c == '<' || c == '#') && xp->xp_context == EXPAND_FUNCTIONS && vim_strchr(xp->xp_pattern, '(') == NULL) { - /* Function name can start with "<SNR>" */ + /* Function name can start with "<SNR>" and contain '#'. */ break; } else if (cmdidx != CMD_let || got_eq) { if (c == '"') { /* string */ @@ -9553,6 +9553,9 @@ static void f_getreg(typval_T *argvars, typval_T *rettv) rettv->v_type = VAR_LIST; rettv->vval.v_list = get_reg_contents(regname, (arg2 ? kGRegExprSrc : 0) | kGRegList); + if (rettv->vval.v_list != NULL) { + rettv->vval.v_list->lv_refcount++; + } } else { rettv->v_type = VAR_STRING; rettv->vval.v_string = get_reg_contents(regname, arg2 ? kGRegExprSrc : 0); |