Christian Brabandt wrote:

On Mi, 11 Dez 2013, William Gardner wrote:

> > I've got an autocommand that triggers on TextChanged and does some
> > processing (removing trailing whitespace) on the just-modified lines,
> > which it finds via the '[ and '] marks.
> > 
> > The problem is, J (join lines) doesn't update those marks. In fact,
> > they're not even updated to account for the fact that a line was just
> > removed from the buffer. If they used to point to lines 77 and 78,
> > they still point to lines 77 and 78 even if I just removed line 60 by
> > joining it to line 59 (letter marks are updated, so they still point
> > to the same text). This leads to errors in some cases, and operating
> > on lines I didn't intend to in others.
> > 
> > Somewhat comically, undoing a join does update the '[ '] marks (so
> > they point to the un-joined lines).
> > 
> > Sounds like a bug to me. Or is this actually intended?
> 
> It was probably forgotten and no one has ever noticed :(
> 
> Attached is a patch.

Thanks.  It's a tiny bit incompatible, would anybody run into a problem
with that?  I don't think so.

> +     if (!t)

I prefer if (t == 0), it's easier to understand.


-- 
hundred-and-one symptoms of being an internet addict:
46. Your wife makes a new rule: "The computer cannot come to bed."

 /// 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/groups/opt_out.

Raspunde prin e-mail lui