Hi Bram and Vimmer,

How to reproduce:
- prepare foo.vim contents is below.
  set omnifunc=XXX
  set nowrap
  function! XXX(findstart, base)
      if a:findstart
          return col(".")
      endif
      normal! gg
      return ['aaa', 'bbb', 'ccc', 'ddd']
  endfunction

- start vim
  $ vim -N -u foo.vim

- input below.
  9o<Esc>o<C-X><C-O>


Expected behavior:
- Display popup on line 12.

Actual behavior:
- Popup Display two place.
  line 4 and line 12.
  line 4 popup is waste.

Attached a patch.
Please check this.

Thank you.
--
Best regards,
Hirohito Higashi

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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
diff -r c21bd8e7346c src/edit.c
--- a/src/edit.c	Fri Aug 22 23:05:54 2014 +0200
+++ b/src/edit.c	Sat Aug 23 11:11:47 2014 +0900
@@ -4035,7 +4035,7 @@
 	goto theend;
     }
     curwin->w_cursor = pos;	/* restore the cursor position */
-    check_cursor();
+    validate_cursor();
     if (!equalpos(curwin->w_cursor, pos))
     {
 	EMSG(_(e_compldel));
@@ -5273,7 +5273,7 @@
 		return FAIL;
 	    }
 	    curwin->w_cursor = pos;	/* restore the cursor position */
-	    check_cursor();
+	    validate_cursor();
 	    if (!equalpos(curwin->w_cursor, pos))
 	    {
 		EMSG(_(e_compldel));

Raspunde prin e-mail lui