Dominique Pelle wrote:
> Recent patch 7.3.100 introduced a regression when appending text in diff mode.
>
> Steps to reproduce:
> ============================================================================
> $ cat .vimrc-bug
> set nocompatible
> set laststatus=2
>
> fun! ShowUtf8Sequence()
> try
> let p = getpos('.')
> redir => utfseq
> sil normal! g8
> redir End
> call setpos('.', p)
> return substitute(matchstr(utfseq, '\x\+ .*\x'), '\<\x', '0x&', 'g')
> catch
> return '?'
> endtry
> endfunction
>
> set statusline=%{ShowUtf8Sequence()}
>
> $ cat foo.xml
> <foo
> </foo>
>
> $ cat bar.xml
> <foo>
> </foo>
>
> $ vim -d --noplugin -u .vimrc-bug foo.xml bar.xml
>
> Now in normal mode, append some text at the end of a line with A:
>
> A1234
>
> Instead of appending 1234 at the end of the line, it appends: 1432o
> ============================================================================
>
> I can reproduce the bug with latest Vim-7.3.107.
>
> Doing a bisection, I found that Vim-7.3.99 and older worked fine
> and bug started to happen in Vim-7.3.100 which was a one-line
> patch:
>
> changeset: 2682:35edf814f223
> user: Bram Moolenaar <[email protected]>
> date: Mon Jan 17 19:50:06 2011 +0100
> files: src/ex_docmd.c src/version.c
> description:
> updated for version 7.3.100
> Problem: When using :normal v:count isn't set.
> Solution: Call normal_cmd() with toplevel set to TRUE.
>
>
> $ diff -r 85c5a72551e2 -r 35edf814f223 src/ex_docmd.c
> --- a/src/ex_docmd.c Sat Jan 08 16:06:37 2011 +0100
> +++ b/src/ex_docmd.c Mon Jan 17 19:50:06 2011 +0100
> @@ -9310,7 +9310,7 @@
> &&
> !got_int)
> {
> update_topline_cursor();
> - normal_cmd(&oa, FALSE); /* execute a Normal mode cmd */
> + normal_cmd(&oa, TRUE); /* execute a Normal mode cmd */
> }
> }
> #endif
>
> Reverting patch 7.3.100 fixes the problem.
But then v:count isn't set. Any idea for a better solution?
--
I wish there was a knob on the TV to turn up the intelligence.
There's a knob called "brightness", but it doesn't seem to work.
/// 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