On 17-Dec-2001 Jean-Marc Lasgouttes wrote:

> No, to do it at the end of the function. Are you just pretending you
> don't understand?

I didn't really understand the question, anyway I think I answered it anyway.

> So tmppar3 is not in the buffer, but there is a paragraph in there
> with the same ID?

Got it!

> No. It could be useful to have some comments on how you use this ID.

Well before we used pointers in the undo information (pointer before/after
the undoed paragraph) now this was good as long as we had only one level deep
undo but now we cannot just say if I don't have a paragraph before it's the
first paragraph in the buffer. So I thought as we already have paragraph ID's
it's the easiest thing to use them. So paragraphs will ALWAYS hold their ID!
This means that if I SAVE a paragraph in the undo/redo stack it will have
it's original ID so I can always find the paragraph inside the buffer as
this paragraph ID is unique! IMO this is a cleaner solution then using
pointers (also probably thinking that later on we won't have the paragraphs
in a double linked list anymore and this aproach will always work!)

> This was not the problem here (more accessing buffer->paragraph() when
> it points to a deleted paragraph). I'll take a look at your new code.

Well I don't think there changed a lot in that part of the code I only fixed
some bugs (well anyway I hated that tmpparX also any time I have a look at
the function, but I thought I'll clean the code up later when it works and
I'm not so good in searching for good names and anyway the code was like this
before too ;)

           Jug

--
-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._
Dr. Jürgen Vigna        E-Mail:  [EMAIL PROTECTED]
Italienallee 13/N       Tel/Fax: +39-0471-450260 / +39-0471-450253
I-39100 Bozen           Web:     http://www.sad.it/~jug
-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._

        WARNING TO ALL PERSONNEL:

Firings will continue until morale improves.

Reply via email to