So, the code that I added will recognize the case where you have
'[Block]...[Block]' and you are deleting the '...[Block]' part.
Instead the deletion code will now delete the '[Block]...' part,
leaving the justification info in the trailing block marker, so any
text following it will behave sanely. This means that I had to update
code in the PieceTable and in the layout to handle the deleting of the
first block marker in a section gracefully iff the block is empty.
Also I added a new PieceTable ChangeRecord type: PXT_ChangePoint for
positioning the point sanely during the Undo/Redo of these operations.
In all:
M text/fmt/xp/fl_BlockLayout.cpp
M text/fmt/xp/fl_BlockLayout.h
M text/fmt/xp/fl_DocListener.cpp
M text/fmt/xp/fl_SectionLayout.cpp
M text/ptbl/xp/pt_PT_DeleteSpan.cpp
M text/ptbl/xp/pt_PT_Undo.cpp
M text/ptbl/xp/pt_PieceTable.cpp
M text/ptbl/xp/pt_PieceTable.h
M text/ptbl/xp/px_ChangeRecord.cpp
M text/ptbl/xp/px_ChangeRecord.h
I tested for a while to make sure I didn't break anything, so I think
things are ok.
-- Matt Kimball mkimball@xmission.com