Hello,

This patch breaks the dot register for my autocompletion plugin when 'refresh: 
always' is NOT set. Once the popup menu shows up, any following character is 
appended twice to the dot register. Although I can work around it by setting 
'refresh: always' (my plugin is not dependent on this), I'm sure there is an 
underlying bug with the code.

Attached is a minimal test case based off of my plugin to reproduce the bug.
My results are marked on the comments of the return clause inside the 
completion function.
It is also available on:

https://gist.github.com/2960778

Steps to reproduce:
1. Run "C:\Program Files (x86)\Vim\vim73\gvim.exe" -u NONE -i NONE
2. :source test.vim
3. Enter insert mode
4. Type test
5. <ESC>
6. :reg(.)

My original plugin is at:
https://github.com/raymond-w-ko/omegacomplete.vim
for any interested as to why I am doing this. Note that it is still a work in 
progress.

On Wednesday, June 20, 2012 8:26:50 AM UTC-4, Bram Moolenaar wrote:
> Patch 7.3.561
> Problem:    Using refresh: always in a complete function breaks the "."
>           command. (Val Markovic)
> Solution:   Add match leader to the redo buffer. (Yasuhiro Matsumoto)
> Files:            src/edit.c
> 
> 
> *** ../vim-7.3.560/src/edit.c 2012-06-13 17:28:51.000000000 +0200
> --- src/edit.c        2012-06-20 14:22:23.000000000 +0200
> ***************
> *** 3467,3476 ****
> --- 3467,3480 ----
>       (*mb_char2bytes)(c, buf);
>       buf[cc] = NUL;
>       ins_char_bytes(buf, cc);
> +     AppendToRedobuff(buf);
>       }
>       else
>   #endif
> +     {
>       ins_char(c);
> +     AppendCharToRedobuff(c);
> +     }
>   
>       /* If we didn't complete finding matches we must search again. */
>       if (ins_compl_need_restart())
> *** ../vim-7.3.560/src/version.c      2012-06-20 14:13:02.000000000 +0200
> --- src/version.c     2012-06-20 14:20:13.000000000 +0200
> ***************
> *** 716,717 ****
> --- 716,719 ----
>   {   /* Add new patch number below this line */
> + /**/
> +     561,
>   /**/
> 
> -- 
> Microsoft is to software what McDonalds is to gourmet cooking
> 
>  /// Bram Moolenaar -- [email protected] -- 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    ///

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

Attachment: test.vim
Description: Binary data

Raspunde prin e-mail lui