Closed GoogleCodeExporter closed 9 years ago
I noticed that bug does not happen with Vim-7.4, but it happens with the
latest Vim-7.4.155. So it's a recent regression.
Doing a bisection to find the change that introduces the bug...
Vim-7.4 -> OK
Vim-7.4.050 -> OK
Vim-7.4.075 -> OK
Vim-7.4.081 -> OK
Vim-7.4.084 -> OK
Vim-7.4.085 -> BUG
Vim-7.4.087 -> BUG
Vim-7.4.100 -> BUG
Vim-7.4.155 -> BUG
So the it's patch 7.4.085 that introduced the bug, which
looks plausible as it modifies insert in visual mode
according its description:
changeset: 5471:70c3289803b3
tag: v7-4-085
user: Bram Moolenaar <bram@vim.org>
date: Mon Nov 11 01:29:22 2013 +0100
files: src/ops.c src/testdir/test39.in src/testdir/test39.ok src/version.c
description:
updated for version 7.4.085
Problem: When inserting text in Visual block mode and moving the cursor the
wrong text gets repeated in other lines.
Solution: Use the '[ mark to find the start of the actually inserted text.
(Christian Brabandt)
Original comment by dominiqu...@gmail.com
on 15 Jan 2014 at 1:11
This is to be expected, since <C-g>u set's the '[ mark and that confuses Vim. I
don't see a way how to fix this currently, besides setting another global
variable, that tracks where inserting text really started.
Original comment by chrisbr...@googlemail.com
on 15 Jan 2014 at 6:57
Christian wrote:
> This is to be expected, since <C-g>u set's the '[ mark and
> that confuses Vim. I don't see a way how to fix this currently,
> besides setting another global variable, that tracks where
> inserting text really started.
I would not call it "expected" from the user point of view, especially
since it's a regression and since the outcome looks random to me.
Instead of getting...
#include "xxyy/foobar.h"
...for the 3rd line after typing the command, I get...
#include "foobyy/foo.ar.h""
I cannot think that it makes sense.
It caused me some real confusion when editing some files at work, until
I found what caused the bug. Bug will probably affect more users.
What you mean by "expected" here is that you
understand why the bug happens as a developer.
Cheers
Dominique
Original comment by dominiqu...@gmail.com
on 16 Jan 2014 at 12:48
The patch posted by Christian Brabandt in vim-dev (on Jan 16, 2014) fixes the
bug.
However, Christian's patch contains a small mistake: variable
update_Insstart_orig is defined in between #ifdef FEAT_INS_EXPAND, yet it is
used outside #ifdef FEAT_INS_EXPAND. So it fails to compile with vim tiny
(configure --with-features=tiny):
edit.c:346:5: error: use of undeclared identifier 'update_Insstart_orig'
update_Insstart_orig = TRUE;
^
edit.c:639:6: error: use of undeclared identifier 'update_Insstart_orig'
if (update_Insstart_orig)
^
Attached patch is a minor correction of Christian's patch so that
it builds successfully with vim tiny.
Original comment by dominiqu...@gmail.com
on 15 Feb 2014 at 10:14
Attachments:
fixed by 7.4.186
Original comment by chrisbr...@googlemail.com
on 2 Oct 2014 at 8:11
Original issue reported on code.google.com by
dominiqu...@gmail.com
on 15 Jan 2014 at 12:47