Lech Lorens wrote:

> Executing the following script (e.g. by saving it into a file called
> do.vim and executing "vim -u NONE -S do.vim") while in src directory
> containing Vim sources should give an incorrectly placed pop-up menu.
> 
> #v+
> set nocompatible
> syntax on
> filetype plugin indent on
> e ex_docmd.c
> set lines=76
> set scrolloff=0
> set nosplitbelow
> 1647
> normal zt
> 1687
> call feedkeys("o\<CR>if (ea.\<C-x>\<C-o>\<C-e>\<C-x>\<C-o>", 'n')
> #v-
> 
> If you scroll through the entries by pressing <C-n> or <C-p> you will
> notice that the part of the menu above the line containing the cursor is
> only an image of a previously drawn menu which should have in fact been
> cleared.
> 
> The attached patch fixes the problem.
> 
> The source of the problem:
> 
> The function ins_compl_show_pum() is called twice:
> - once by ins_compl_next() which is called by ins_complete(),
> - once by ins_complete() itself.
> 
> ins_compl_show_pum() calls pum_display() which uses the value of
> curwin->w_wrow to calculate the position of the pop-up menu.
> curwin->w_wrow is different in the two calls to ins_compl_show_pum().
> 
> NOTE:
> - being able to reproduce the problem depends on the size of the screen
>   (hence "set lines=76"),
> - it is not possible to make the check for w_wrow in
>   ins_compl_upd_pum(), as it would not work for gvim (setcursor()
>   is called in ins_compl_next()).

Thanks.  I'll look at the details later.

-- 
Why doesn't Tarzan have a beard?

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

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