On Fr, 14 Nov 2014, Christian Brabandt wrote:

> Bram,
> a bug has been reported at stackoverflow:
> http://stackoverflow.com/questions/26927016/vim-change-list-behaviour
> 
> This happens, because the lnum variable should be decremented before 
> changed_bytes in do_put() (it was incremented in the loop before).
> 
> This patch fixes it.

This patch is better:

diff --git a/src/ops.c b/src/ops.c
--- a/src/ops.c
+++ b/src/ops.c
@@ -3831,6 +3831,9 @@ do_put(regname, dir, count, flags)
                    lnum++;
            } while (VIsual_active && lnum <= curbuf->b_visual.vi_end.lnum);

+           if (VIsual_active) /* reset lnum to the last visual line */
+               lnum--;
+
            curbuf->b_op_end = curwin->w_cursor;
            /* For "CTRL-O p" in Insert mode, put cursor after last char */
            if (totlen && (restart_edit != 0 || (flags & PUT_CURSEND)))



Best,
Christian
-- 
Man empfindet es oft als ungerecht, daß Menschen, die Stroh im Kopf
haben, auch noch Geld wie Heu besitzen.
                -- Gerhard Uhlenbruck

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

Raspunde prin e-mail lui