Hi.

When you type ':echo <tab>', you can see complete candidates like variables, 
functions, or etc.
But it include dict functions.  For example,

-------
$ cat foo.vim
let s:foo = {}
function! s:foo.bar()
endfunction

$ vim -u foo.vim -N
-------

Type ":echo <tab>", it will be ":echo 1()".
Below is a patch for fixing this problem.

Note that this patch remove dict functions and script functions from 
complete candidates.
I think completing of script functions is not useful for us like 
'<SNR>14_XXX'.
Please check and include.

Thanks.

diff -r 409691084d19 src/eval.c
--- a/src/eval.c Tue Oct 04 21:22:44 2011 +0200
+++ b/src/eval.c Fri Oct 07 13:32:44 2011 +0900
@@ -21735,6 +21735,9 @@
     ++hi;
  fp = HI2UF(hi);
 
+ if (fp->uf_flags & FC_DICT || fp->uf_name[0] == K_SPECIAL)
+    return NULL;
+
  if (STRLEN(fp->uf_name) + 4 >= IOSIZE)
     return fp->uf_name; /* prevents overflow */
 

-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Raspunde prin e-mail lui