Hi list.

$ cat < test.vim
set nocompatible

call append(1, 'aa11')
call append(1, 'aa11')

inoremap <F5> <C-R>=ListMonths()<CR>

func! ListMonths()
  call complete(1, ['January', 'February', 'March',
        \ 'April', 'May', 'June', 'July', 'August', 'September',
        \ 'October', 'November', 'December'])
  return ''
endfunc
^D

$ vim -u test.vim

Then:

1. type /11<cr> to jump to first aa11.
2. type cw to change word. 22 is stored in dot register.
3. type <F5><c-p>2<F5><c-p>2<esc> (canceling completion, do not select 
candidate)
4. type n. to apply dot register on second aa11.

But:

aa22
aa2

This should be:

aa22
aa22

Below is a patch to ignore modifying dot-register while completion is active.

diff -r cd5eff09c1ae src/fileio.c
--- a/src/fileio.c      Thu Feb 05 20:29:59 2015 +0100
+++ b/src/fileio.c      Tue Feb 17 12:51:38 2015 +0900
@@ -9430,7 +9430,8 @@
     if (!autocmd_busy)
     {
        save_search_patterns();
-       saveRedobuff();
+       if (!ins_compl_active())
+           saveRedobuff();
        did_filetype = keep_filetype;
     }
 

-- 
-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui