Complete function isn't called when leader changed.

13 views
Skip to first unread message

MURAOKA Taro

unread,
Aug 20, 2011, 10:46:09 PM8/20/11
to vim-dev, Bram Moolenaar
Hi vim-dev list and Bram.


I found and fixed a problem, that complete-function isn't called when
leader changed.
To re-produce this problem, try below:

1. source attached vim script: requery_compl_func.vim
* It completes very limited strings, only "a" and "ab".
* Complete "a" to "foo1", "foo2" and "foo3".
* Complete "ab" to "bar1", "bar2" and "bar3".
2. Insert a character "a" then start complete by function (i_CTRL-X_CTRL-U).
* Three candidates ("foo1" - "foo3") will be shown, which returned
by script.
3. Cancel candidate by CTRL-P (and completion mode wi be continue).
4. Type a character "b" (of cource completion mode is continue).

At step 4, I expect that complete function be called because of leader changing,
and three other candidate ("bar1" - "bar3") should be shown.
But it won't, actually.


Attached patch will fix this, please check it.
Thanks.
--
MURAOKA Taro <koron....@gmail.com>

requery_compl_func.diff
requery_compl_func.vim

Bram Moolenaar

unread,
Aug 21, 2011, 11:53:26 AM8/21/11
to MURAOKA Taro, vim-dev

Taro Muraoka wrote:

Thanks. I will check it out later this week.

--
A law to reduce crime states: "It is mandatory for a motorist with criminal
intentions to stop at the city limits and telephone the chief of police as he
is entering the town.
[real standing law in Washington, United States of America]

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

Reply all
Reply to author
Forward
0 new messages