I have found a bug in gvim on Win32 that has been around since 7.1.95.
So far I have determined that it involves a custom 'completefunc'
that calls the built-in Vim function system().
Furthermore, calls to complete_check() change the behavior of the bug.

I have created a script which exhibits this bug.  I have made one completion
function which I assign to
'omnifunc'; and another which is assigned to 'completefunc'.  They are
identical functions, except that
the 'omnifunc' version calls complete_check().


Case omnifunc:
Start up vim
:source complete_test.vim
iap^X^O
"at this point, the omnicompletion message is displayed in the command-line,
and the 'ap' you just typed has disappeared.
^N "your original 'ap' text is restored
^N "your text is now expanded to the value of the first match.
"further presses of ^N cycle between your original text and the first match;
the other matches were not added to the list
"returned by the completion function.
"EOF

In the loop that adds items to the completion list, I'm calling
complete_check().  In Vims <= 7.1.94, complete_check() returned 0.
Now it returns 1.

Case completefunc:
Start up vim
:source complete_test.vim
iap^X^O
"at this point, the user defined completion message is displayed in the
command-line, and the 'ap' you just typed has disappeared.
^N "Your text is replaced with the 2nd item from the completion list
"subsequent ^N keystrokes cycle through the list
"EOF

This case doesn't use complete_check(), and therefore builds the whole list.
 But the popup menu still doesn't appear right-away as it
does in previous patches.

-- 
Erik Falor
Registered Linux User #445632 http://counter.li.org

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Attachment: complete_test.vim
Description: Binary data

Raspunde prin e-mail lui