From: Jean-Marc Lasgouttes Date: Wed, 17 Jan 2007 15:32:43 +0000 (+0000) Subject: * BufferView.C (mouseSetCursor): if the cursor was in an empty X-Git-Tag: 1.6.10~11160 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=976d38f7b796aacca3e2b88d77ecd83f0e3cf584;p=lyx.git * 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 --- 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 <