[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]



If a line is continued by a tab, there is no "!" in the continuation column,
and all sorts of horrible things happen if the tab is rubbed out by the tab-hacking
rubout.  For example, it leads to errors "Recenter type :POINT left point outside
the window", to lines with negative fill pointers, to lines with tick = DELETED
left in the buffer after DELETE-INTERVAL bombed when I tried to fix things, etc.
To create this, just make a short line with a comment considerably indented by
several tabs, and then start adding stuff at the front.  Then go to the end and 
start rubbing stuff out, or to the tab that continues.

I think that (ZED) ought to sanitize the buffer by going through and fixing any
conditions that would make it impossible to edit the buffer.  There will always
be such bugs as this one from time to time, and it would be good if they
didn't screw the user out of writing his file out.  Note that this bug has
nothing to do with what I was working on in this session, so I had no reason to
be cautious about such problems.  It could happen to anyone at any time.

For example, any "deleted" lines would have their ticks set to reasonable values.
All LINE-PREVIOUS components would be set to the correct previous line.
Any line with negative fill pointer would get its fill pointer set from its real size
to bring back any interesting text in case the user wants it.
The interval-last-bp would be set to the line which had no next.
Point would be brought in range if its char pos were unreasonable.
If its line had not been seen during the scan, it would be set to the beginning of
the buffer.  To help the user know where the lossages were, lines saying
**** Inconsistent editor data structure was found below **** could be inserted
at the appropriate places, and a message telling him that such had been found
would be printed to direct him to search for ****.

Another way to make things more robust is to make DELETE-INTERVAL do ALL its
error checking before changing anything; absolutely NO path for bombing out
in the middle with an inconsistent buffer.  Then at least it would not have made
things worse as it did.