>>>>> "Juergen" == Juergen Spitzmueller <[EMAIL PROTECTED]> writes:

Juergen> Jean-Marc Lasgouttes wrote:
>> Yes, we shall remove
>> 
>>          cmd = FuncRequest(LFUN_FINISHED_LEFT);        
>>  cur.undispatched();

Juergen> OK. Do you happen to have a patch in hand?

OK, you win :)

This fixes the leaving of inset, and also the selection of
not-so-small atoms. 

Please test.

JMarc

Index: src/cursor.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/cursor.C,v
retrieving revision 1.136
diff -u -p -r1.136 cursor.C
--- src/cursor.C	28 Sep 2005 15:02:47 -0000	1.136
+++ src/cursor.C	30 Sep 2005 09:06:56 -0000
@@ -782,7 +782,7 @@ bool LCursor::erase()
 	}
 
 	// 'clever' UI hack: only erase large items if previously slected
-	if (pos() != lastpos() && inset().nargs() > 0) {
+	if (pos() != lastpos() && nextAtom()->nargs() > 0) {
 		resetAnchor();
 		selection() = true;
 		++pos();
Index: src/mathed/ChangeLog
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/ChangeLog,v
retrieving revision 1.522
diff -u -p -r1.522 ChangeLog
--- src/mathed/ChangeLog	27 Sep 2005 08:42:26 -0000	1.522
+++ src/mathed/ChangeLog	30 Sep 2005 09:06:57 -0000
@@ -1,6 +1,12 @@
+2005-09-30  Jean-Marc Lasgouttes  <[EMAIL PROTECTED]>
+
+	* math_nestinset.C (doDispatch): do not leave the inset after
+	LFUN_DELETE. (part of bug 2057)
+
 2005-09-27  Jürgen Spitzmüller  <[EMAIL PROTECTED]>
 
-	* math_nestinset.C (doDispatch): leave inset to the right when hitting ESC.
+	* math_nestinset.C (doDispatch): leave inset to the right when
+	hitting ESC.
 
 2005-09-27  Jürgen Spitzmüller  <[EMAIL PROTECTED]>
 
Index: src/mathed/math_nestinset.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_nestinset.C,v
retrieving revision 1.170
diff -u -p -r1.170 math_nestinset.C
--- src/mathed/math_nestinset.C	27 Sep 2005 08:42:26 -0000	1.170
+++ src/mathed/math_nestinset.C	30 Sep 2005 09:06:57 -0000
@@ -622,8 +622,6 @@ void MathNestInset::doDispatch(LCursor &
 	case LFUN_DELETE:
 		recordUndo(cur);
 		cur.erase();
-		cmd = FuncRequest(LFUN_FINISHED_LEFT);
-		cur.undispatched();
 		break;
 
 	case LFUN_ESCAPE:

Reply via email to