jeromejj / vim

Automatically exported from code.google.com/p/vim
0 stars 0 forks source link

tab-completion on the cmdline does not appear to work for autoload functions #253

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When trying to tab-complete an autoload function on the cmdline, it fails to 
complete properly after the dash ("#").

E.g., `:call neobundle#ge<tab>` will complete `call()` etc, like with `:call 
ge<tab>`.

The completion works properly with e.g. `:tj`, but that's likely because it 
completes tags file identifiers as-is.

Where/how is the completion for `:call` defined?

What version of the product are you using? On what operating system?
Vim 7.4.417

Original issue reported on code.google.com by dhahler@gmail.com on 26 Aug 2014 at 11:28

GoogleCodeExporter commented 9 years ago
I posted a patch here: 
https://groups.google.com/d/msg/vim_dev/aBiMz2vVbMk/vEEu98F0KwoJ

Original comment by chrisbr...@googlemail.com on 8 Oct 2014 at 8:19

GoogleCodeExporter commented 9 years ago
Fixed by patch 7.4.516

Original comment by brammool...@gmail.com on 12 Nov 2014 at 7:10

GoogleCodeExporter commented 9 years ago
Thanks!

It works now for "call", but not for e.g. "echo".

The following patch fixes this, but is likely not the correct way:

diff --git i/src/eval.c w/src/eval.c
index fe7289a..9d8f42a 100644
--- i/src/eval.c
+++ w/src/eval.c
@@ -3369,7 +3369,7 @@ set_context_for_expression(xp, arg, cmdidx)
            xp->xp_context = EXPAND_EXPRESSION;
        }
        else if ((c == '<' || c == '#')
-               && xp->xp_context == EXPAND_FUNCTIONS
+               /* && xp->xp_context == EXPAND_FUNCTIONS */
                && vim_strchr(xp->xp_pattern, '(') == NULL)
        {
            /* Function name can start with "<SNR>" and contain '#'. */

Original comment by dhahler@gmail.com on 15 Nov 2014 at 7:06