From 976d38f7b796aacca3e2b88d77ecd83f0e3cf584 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Wed, 17 Jan 2007 15:32:43 +0000 Subject: [PATCH] * BufferView.C (mouseSetCursor): if the cursor was in an empty script inset and the new position is in the nucleus of the inset, notifyCursorLeaves will kill the script inset itself. So we check all the elements of the cursor to make sure that they are correct (bug 2933). git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16729 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/BufferView.C | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/BufferView.C b/src/BufferView.C index a9ec2eb305..2643659f94 100644 --- a/src/BufferView.C +++ b/src/BufferView.C @@ -1278,7 +1278,24 @@ bool BufferView::mouseSetCursor(LCursor & cur) if (!badcursor && cursor_.inTexted()) checkDepm(cur, cursor_); - cursor_ = cur; + // if the cursor was in an empty script inset and the new + // position is in the nucleus of the inset, notifyCursorLeaves + // will kill the script inset itself. So we check all the + // elements of the cursor to make sure that they are correct. + // For an example, see bug 2933: + // http://bugzilla.lyx.org/show_bug.cgi?id=2933 + // The code below could maybe be moved to a DocIterator method. + //lyxerr << "cur before " << cur <