From 7bf0cfb01f860a4fb2fdb88de752293ea023f4f6 Mon Sep 17 00:00:00 2001 From: Jurica Bradaric Date: Sun, 18 Sep 2016 16:20:08 +0200 Subject: vim-patch:7.4.1670 Problem: Completion doesn't work well for a variable containing "vim/vim#". Solution: Recognize the "vim/vim#". (Watiko) https://github.com/vim/vim/commit/a32095fc8fdf5fe3d487c86d9cc54adb1236731e --- src/nvim/eval.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/nvim/eval.c') diff --git a/src/nvim/eval.c b/src/nvim/eval.c index c762ce9fff..7d7aea83af 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -2684,6 +2684,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 == '#' + && xp->xp_context == EXPAND_EXPRESSION) { + // Autoload function/variable contains '#' + break; } else if ((c == '<' || c == '#') && xp->xp_context == EXPAND_FUNCTIONS && vim_strchr(xp->xp_pattern, '(') == NULL) { -- cgit