Christian Brabandt wrote:
> > > On Do, 15 Mär 2012, Gary Johnson wrote:
> > >
> > > > That's an odd error message, since there are no search commands in
> > > > that sequence, as I understood it. Using a different notation,
> > > > here's what I typed.
> > > >
> > > > <C-V>G$A<BS><BS><Esc>
> > >
> > > Was this ever supposed to work?
> > >
> > > Anyway, this is a bug. I have a patch that prevents this. But trying to
> > > make this works as intended by the OP requires some more work and I am
> > > still looking into this.
> >
> > In my opinion, what should happen is that Vim notices that no characters
> > have been added, thus will not try to replay the change to other lines.
>
> ok. This patch fixes it:
> diff --git a/src/ops.c b/src/ops.c
> --- a/src/ops.c
> +++ b/src/ops.c
> @@ -2602,7 +2602,7 @@
> firstline = ml_get(oap->start.lnum) + bd.textcol;
> if (oap->op_type == OP_APPEND)
> firstline += bd.textlen;
> - if ((ins_len = (long)STRLEN(firstline) - pre_textlen) > 0)
> + if ((ins_len = (long)STRLEN(firstline) - abs(pre_textlen)) > 0)
> {
> ins_text = vim_strnsave(firstline, (int)ins_len);
> if (ins_text != NULL)
Thanks, I'll try it out.
> > Perhaps we could work on another operation in Visual mode for repeating
> > a delete operator in a number of lines. I don't think something would
> > be need in Visual block mode, you can already delete or change a visual
> > block. It's probably only interesting to repeat a change or delete
> > operation relative to the end of a line.
>
> Like what? I would think, that deleting something would only make sense
> in visual block mode. That's why I thought,
You can already delete a visually selected block. But not a number of
characters counted from the end of the line, that's not a block.
> > As an easier way than using ":<range>s/..$//"
>
> this would be nice.
--
>From the classified section of a city newspaper:
Dog for sale: eats anything and is fond of children.
/// 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