From 9f3c96efc5d9bdb6d5b7a609b55dbff74156a8f3 Mon Sep 17 00:00:00 2001 From: Bo Peng Date: Mon, 14 May 2007 03:07:00 +0000 Subject: [PATCH] Bug 3600, not a real solution but prevents lyx from crashing git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18299 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/CutAndPaste.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/CutAndPaste.cpp b/src/CutAndPaste.cpp index c05e80130d..07c74cd3ed 100644 --- a/src/CutAndPaste.cpp +++ b/src/CutAndPaste.cpp @@ -301,7 +301,12 @@ PitPosPair eraseSelectionHelper(BufferParams const & params, for (pit_type pit = startpit; pit != endpit + 1;) { pos_type const left = (pit == startpit ? startpos : 0); - pos_type const right = (pit == endpit ? endpos : pars[pit].size() + 1); + pos_type right = (pit == endpit ? endpos : pars[pit].size() + 1); + // FIXME: this is a quick fix for bug 3600. It stops a crash but the problem + // still remains unsolved (e.g. the second example in the bug report). + // c.f. http://bugzilla.lyx.org/show_bug.cgi?id=3600 + if (right > pars[pit].size() + 1) + right = pars[pit].size() + 1; bool const merge = pars[pit].isMergedOnEndOfParDeletion(params.trackChanges); -- 2.39.2