+2003-08-05 Alfredo Braunstein <abraunst@libero.it>
+
+ * text2.C (DEPM): fix part of bug 1255 and 1256
+
2003-08-05 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
* BufferView_pimpl.C (workAreaDispatch): change to use
}
recordUndo(bv(), Undo::DELETE, selection.start.par(),
- boost::prior(undoendpit));
+ boost::prior(undoendpit));
endpit = selection.end.par();
selection.start.par()->stripLeadingSpaces();
redoParagraphs(selection.start.par(), boost::next(endpit));
-#warning FIXME latent bug
- // endpit will be invalidated on redoParagraphs once ParagraphList
- // becomes a std::list? There are maybe other places on which this
- // can happend? (Ab)
// cutSelection can invalidate the cursor so we need to set
// it anew. (Lgb)
// we prefer the end for when tracking changes
&& old_cursor.pos() < old_cursor.par()->size()
&& old_cursor.par()->isLineSeparator(old_cursor.pos())
&& old_cursor.par()->isLineSeparator(old_cursor.pos() - 1)) {
- old_cursor.par()->erase(old_cursor.pos() - 1);
+ bool erased = old_cursor.par()->erase(old_cursor.pos() - 1);
redoParagraph(old_cursor.par());
+ if (!erased)
+ return false;
#ifdef WITH_WARNINGS
#warning This will not work anymore when we have multiple views of the same buffer
// In this case, we will have to correct also the cursors held by