Ok.
Bram, If anyone don't object to this changes, please check and include.

https://gist.github.com/1280464

diff -r 409691084d19 src/eval.c
--- a/src/eval.c Tue Oct 04 21:22:44 2011 +0200
+++ b/src/eval.c Wed Oct 12 15:41:53 2011 +0900
@@ -21735,6 +21735,9 @@
     ++hi;
  fp = HI2UF(hi);
 
+ if (fp->uf_flags & FC_DICT)
+    return NULL; /* don't show dict functions */
+
  if (STRLEN(fp->uf_name) + 4 >= IOSIZE)
     return fp->uf_name; /* prevents overflow */
 
diff -r 409691084d19 src/ex_getln.c
--- a/src/ex_getln.c Tue Oct 04 21:22:44 2011 +0200
+++ b/src/ex_getln.c Wed Oct 12 15:41:53 2011 +0900
@@ -3286,6 +3286,21 @@
     return check_abbr(c, ccline.cmdbuff, ccline.cmdpos, 0);
 }
 
+    static int
+#ifdef __BORLANDC__
+_RTLENTRYF
+#endif
+sort_func_compare(s1, s2)
+    const void *s1;
+    const void *s2;
+{
+    char_u *p1 = *(char **)s1, *p2 = *(char **)s2;
+    
+    if (*p1 != '<' && *p2 == '<') return -1;
+    if (*p1 == '<' && *p2 != '<') return 1;
+    return STRCMP(p1, p2);
+}
+
 /*
  * Return FAIL if this is not an appropriate context in which to do
  * completion of anything, return OK if it is (even if there are no 
matches).
@@ -4734,8 +4749,16 @@
     }
 
     /* Sort the results.  Keep menu's in the specified order. */
-    if (xp->xp_context != EXPAND_MENUNAMES && xp->xp_context != 
EXPAND_MENUS)
- sort_strings(*file, *num_file);
+    if (xp->xp_context != EXPAND_MENUNAMES && xp->xp_context != 
EXPAND_MENUS) {
+ if (xp->xp_context == EXPAND_EXPRESSION
+ || xp->xp_context == EXPAND_FUNCTIONS
+ || xp->xp_context == EXPAND_USER_FUNC)
+    /* <SNR> functions should be sorted to the end. */
+    qsort((void *)*file, (size_t)*num_file, sizeof(char_u *),
+    sort_func_compare);
+ else
+    sort_strings(*file, *num_file);
+    }
 
 #ifdef FEAT_CMDL_COMPL
     /* Reset the variables used for special highlight names expansion, so 
that

-- 
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