On Sat, Oct 25, 2003 at 01:28:07PM +0200, Alfredo Braunstein wrote:
> Index: undo.C
> ===================================================================
> RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/undo.C,v
> retrieving revision 1.23
> diff -u -p -u -r1.23 undo.C
> --- undo.C      15 Oct 2003 08:49:42 -0000      1.23
> +++ undo.C      25 Oct 2003 11:24:16 -0000
> @@ -170,7 +170,7 @@ bool performUndoOrRedo(BufferView * bv, 
>                 ParagraphList::iterator first = plist.begin();
>                 advance(first, undo.first_par);
>                 ParagraphList::iterator last = plist.begin();
> -               advance(last, plist.size() - undo.end_par);
> +               advance(last, undo.end_par);
>                 plist.erase(first, ++last);
>         }
> 
> 
> Isn't this intended instead? In any case, undo is still unusable.

I don't think so. 

end_par is indeed the difference to the _end_, not an offset to the
begin. This way, both values stay correct even if something is deleted
or inserted in the middle.

[I am not sure we still need this, though].

Andre'

-- 
Those who desire to give up Freedom in order to gain Security, will not have,
nor do they deserve, either one.     (T. Jefferson or B. Franklin or both...)

Reply via email to