On Wed, 2006-10-25 at 13:00 +0200, Jean-Marc Lasgouttes wrote:
> >>>>> "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes:
> 
> Martin> Rather try this one. PBCAK.
> 
> I see a crash too when using down.

Do you have a recipe?

> The undo should be done from the first pit of the moved range

This is called 'pit' in the code, assigned to the cursor position before
anything happens

>  to
> the last pit before the place where the section contents goes.

This is called 'q', also 'newpit'.

>  
> Example
> 
> [pit=0] Section 1
> [pit=1] contents of section 1
> [pit=2] Section 2
> [pit=3] contents of section 2
> [pit=4] Section 3
> [pit=5] contents of section 3
> 
> After doing 'down' on Section 1, we get
> 
> [pit=0] Section 2
> [pit=1] contents of section 2
> [pit=2] Section 1
> [pit=3] contents of section 1
> [pit=4] Section 3
> [pit=5] contents of section 3
> 
> Consequently, undo should go from pit 0 to pit 3. Is that what you do?

I believe so. Possibly newpit includes [pit=4], I'm not quite sure (does
it matter?)

> I cannot follow your code because I do not know what p, q and friends
> are (this is where using correct variable names makes sense).

It wouldn't be very much less convoluted with names, I can promise
you :-) But I can give that a try.

> JMarc

- Martin

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to