Gautam Iyer wrote:
> On Thu, Aug 16, 2007 at 08:33:29PM +0200, Bram Moolenaar wrote:
>
> > > If I undo a change, and then do
> > >
> > > undojoin | delete
> > >
> > > I get an error. Perhaps you could add a "undojoin!" command that
> > > silently ignores the "undojoin" if the previous operation was an undo.
> >
> > That is not possible. Allowing this would corrupt the undo
> > information. At least without making an effort of erasing the change
> > that was undone before undojoin and fixing up the saved information.
> > That means redo will not be possible.
>
> Let me clarify what I meant:
>
> :undojoin!
>
> does *nothing* if the previous change was an undo, and is equivalent to
> ":undojoin" if the previous change was an undo. This is certainly
> possible even in a script:
>
> try
> undojoin
> catch
> do nothing
> endtry
>
> But ":undojoin!" would eliminate such atrocities :).
There is a generic way to silence errors, there is no need to add this
functionality to every command:
:silent! undojoin
--
hundred-and-one symptoms of being an internet addict:
183. You move your coffeemaker next to your computer.
/// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ download, build and distribute -- http://www.A-A-P.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---