Dominique Pellé wrote:
> François Ingelrest wrote:
>
>> Hi all,
>>
>> Attached is a screenshot of what I get sometimes when trying to
>> auto-complete the current word. The popup first appears correctly on
>> the right of the screen (where the cursor is), but while going through
>> the choices, it jumps to the left of the screen when the current
>> choice is too long. The problem is that the previous popup on the
>> right is not erased and stays there until I close the left one.
>>
>> I'm sorry but I don't have a simple test case at hand, so maybe this
>> won't help much.
>>
>> This is with Vim 7.2.343 on Ubuntu 9.10.
>
> Hi
>
> I can reproduce something a bit similar (but not exactly
> the same, so I'm no sure sure it's the same bug) when
> displaying a pum with ":set number" and long lines that
> wrap. It happens with Vim in a terminal or with gvim.
>
> Steps to reproduce:
>
> 1/ Use following minimalistic ~/.vimrc file:
>
> set columns=80 lines=25 number
> set completeopt=menuone,longest
>
> 2/ Run:
>
> vim -c 'call feedkeys(repeat("abc defgh ", 20)."\<c-p>\<Down>\<Down>")'
>
> 3/ Observe that the pum is incorrectly displayed
> as shown in following screenshot:
>
> http://dominique.pelle.free.fr/pic/bug-pum-number.png
>
> I can reproduce it with latest Vim-7.2.343, but
> also with an older Vim (7.2.245). So at least it's
> not a recent regression.
>
> I can try to investigate later when I have time.
>
> Regards
> -- Dominique
Please try the attached patch.
It fixes the pum bug described in this thread.
Bug is in function 'validate_cursor()' which means that
features other than the pum may be affected by the fix.
So patch needs to be tested and reviewed.
My previous email described how to reproduce the bug.
Regards
-- Dominique
--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
diff -r fb1222c880fc src/move.c
--- a/src/move.c Wed Jan 20 21:41:47 2010 +0100
+++ b/src/move.c Wed Jan 20 22:40:14 2010 +0100
@@ -901,10 +901,7 @@
if (curwin->w_p_wrap
&& col >= (colnr_T)W_WIDTH(curwin)
&& W_WIDTH(curwin) - off + curwin_col_off2() > 0)
- {
- col -= W_WIDTH(curwin);
col = col % (W_WIDTH(curwin) - off + curwin_col_off2());
- }
if (col > (int)curwin->w_leftcol)
col -= curwin->w_leftcol;
else