mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-05 13:26:21 +00:00
Fix the critical part of Bug 1255 and Bug 1256.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7511 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
635895783d
commit
f86ab4de32
@ -1,3 +1,7 @@
|
||||
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
|
||||
|
10
src/text2.C
10
src/text2.C
@ -1258,7 +1258,7 @@ void LyXText::cutSelection(bool doclear, bool realcut)
|
||||
}
|
||||
|
||||
recordUndo(bv(), Undo::DELETE, selection.start.par(),
|
||||
boost::prior(undoendpit));
|
||||
boost::prior(undoendpit));
|
||||
|
||||
|
||||
endpit = selection.end.par();
|
||||
@ -1281,10 +1281,6 @@ void LyXText::cutSelection(bool doclear, bool realcut)
|
||||
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
|
||||
@ -2065,9 +2061,11 @@ bool LyXText::deleteEmptyParagraphMechanism(LyXCursor const & old_cursor)
|
||||
&& 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
|
||||
|
Loading…
Reference in New Issue
Block a user