There are two problems in completion.  I wrote a patch.  Please check
the following.

1. 'ignorecase' does not work for completion.

For example, when ":set nosmartcase ignorecase" and buffer is
  1: foo
  2: Foo
Then, complete with
  3: <C-N>
or
  3: f<C-N>
or
  3: F<C-N>
In all cases, only "foo" is matched.


2. Completion is slow when 'completeopt' doesn't have "menu" and
   "menuone".  Until search finished, current selected item is not
   displayed and typed key is not handled (except CTRL-C).


First part of patch is for (1).  Second part is for (2).

--- edit.c.orig Fri Sep 22 19:57:28 2006
+++ edit.c      Fri Sep 22 19:57:34 2006
@@ -2157,7 +2157,7 @@
        do
        {
            if (    !(match->cp_flags & ORIGINAL_TEXT)
-                   && ins_compl_equal(match, str, len)
+                   && STRNCMP(match->cp_str, str, len) == 0
                    && match->cp_str[len] == NUL)
                return NOTDONE;
            match = match->cp_next;
@@ -4041,7 +4041,7 @@
            if (got_int)
                break;
            /* Fill the popup menu as soon as possible. */
-           if (pum_wanted() && type != -1)
+           if (type != -1)
                ins_compl_check_keys(0);
 
            if ((ctrl_x_mode != 0 && ctrl_x_mode != CTRL_X_WHOLE_LINE)

-- 
Yukihiro Nakadaira - [EMAIL PROTECTED]

Reply via email to