I have written a custom completion function that runs an external program to

generate a list of possible completions. I call it from within input() and
use
it to provide completion to commands.

After I applied patch 7.1.104, pressing Tab the second time after the first
completion suggestion is given does not cycle through the list of
alternatives.
Instead, it looks like it is running the external command all over again,
and
putting the first suggestion back into the prompt.

The custom completion function caches the results of the external command so
that the /next/ time I bring up the prompt, it doesn't have to run that
program
again. When the completion function fetches the list from memory, it
behaves. It
is only when it must go to the external program that the prompt fails to
cycle
through the list of items returned by the external program.

Just in case you do not have a plugin which provides a custom completion
function that uses an external program, I have attached a simple script that
emulates my real-life plugin. It uses the output of the 'echo' program to
provide completions to input() and to a command. One mapping uses a
completion
function that caches the results, and another does not cache the results to
give
you a feel for the difference.

Patch 7.1.095 is related to 7.1.104, but those changes do not exhibit this
bug.

This is my version info:

VIM - Vi IMproved 7.1 (2007 May 12, compiled Oct 30 2007 11:19:11)
MS-Windows 32 bit GUI version with OLE support
Included patches: 1-76, 78-104
Compiled by [EMAIL PROTECTED]
Huge version with GUI. Features included (+) or not (-):
+arabic +autocmd +balloon_eval +browse ++builtin_terms +byte_offset +cindent

+clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info
+comments
+cryptv +cscope +cursorshape +dialog_con_gui +diff +digraphs -dnd -ebcdic
+emacs_tags +eval +ex_extra +extra_search +farsi +file_in_path +find_in_path

+folding -footer +gettext/dyn -hangul_input +iconv/dyn +insert_expand
+jumplist
+keymap +langmap +libcall +linebreak +lispindent +listcmds +localmap +menu
+mksession +modify_fname +mouse +mouseshape +multi_byte +multi_lang
-mzscheme
+netbeans_intg +ole -osfiletype +path_extra +perl/dyn -postscript +printer
+profile +python/dyn +quickfix +reltime +rightleft +ruby/dyn +scrollbind
+signs
+smartindent -sniff +statusline -sun_workshop +syntax +tag_binary
+tag_old_static -tag_any_white -tcl -tgetent -termresponse +textobjects
+title
+toolbar +user_commands +vertsplit +virtualedit +visual +visualextra
+viminfo
+vreplace +wildignore +wildmenu +windows +writebackup -xfontset -xim
-xterm_save -xpm_w32
system vimrc file: "$VIM\vimrc"
user vimrc file: "$HOME\_vimrc"
2nd user vimrc file: "$VIM\_vimrc"
user exrc file: "$HOME\_exrc"
2nd user exrc file: "$VIM\_exrc"
system gvimrc file: "$VIM\gvimrc"
user gvimrc file: "$HOME\_gvimrc"
2nd user gvimrc file: "$VIM\_gvimrc"
system menu file: "$VIMRUNTIME\menu.vim"
Compilation: cl -c /W3 /nologo -D_MT -MT -I. -Iproto -DHAVE_PATHDEF -DWIN32
-DFEAT_CSCOPE -DFEAT_NETBEANS_INTG -DWINVER=0x0400 -D_WIN32_WINNT=0x0400
/Fo.\ObjGOLYR/ /Ox -DNDEBUG /G7 /arch:SSE2 -DFEAT_OLE -DFEAT_GUI_W32
-DDYNAMIC_ICONV -DDYNAMIC_GETTEXT -DFEAT_PYTHON -DDYNAMIC_PYTHON
-DDYNAMIC_PYTHON_DLL=\" python25.dll\" -DFEAT_PERL -DDYNAMIC_PERL
-DDYNAMIC_PERL_DLL=\"perl58.dll\" -DFEAT_RUBY -DDYNAMIC_RUBY
-DDYNAMIC_RUBY_VER=18 -DDYNAMIC_RUBY_DLL=\"msvcrt-ruby18.dll\" -DFEAT_HUGE
/Zi /Fd.\ObjGOLYR/
Linking: link /RELEASE /nologo /subsystem:windows /incremental:no
/nodefaultlib:libc advapi32.lib shell32.lib gdi32.lib comdlg32.lib ole32.lib
uuid.lib oldnames.lib kernel32.lib gdi32.lib version.lib winspool.lib
comctl32.lib advapi32.lib shell32.lib /machine:i386 /nodefaultlib libcmt.lib
oleaut32.lib user32.lib /nodefaultlib:python25.lib WSock32.lib
/PDB:gvim.pdb-debug


-- 
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: completion_test.vim
Description: Binary data

Raspunde prin e-mail lui