Yasuhiro Matsumoto wrote:
> 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;
> }
Thanks. However, the call to restoreRedobuff() should then also be
skipped, otherwise the count for save_level will be off. I'll make
that work.
--
hundred-and-one symptoms of being an internet addict:
236. You start saving URL's in your digital watch.
/// 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
---
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.