>>>>> "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes:

>>  This is because of the 'no two consecutive spaces' code. This
>> means that your other patch (to insettabular) is actually needed
>> (sorry I answer in the wrong order). Stick it in.

Martin> Which one precisely? The adding of pos() = lastpos() in two
Martin> places?
 
It was this one. However, I'd propose this one instead.

JMarc

Index: src/insets/ChangeLog
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/ChangeLog,v
retrieving revision 1.1193
diff -u -p -r1.1193 ChangeLog
--- src/insets/ChangeLog	19 Oct 2005 20:01:48 -0000	1.1193
+++ src/insets/ChangeLog	20 Oct 2005 14:44:18 -0000
@@ -1,3 +1,8 @@
+2005-10-20  Jean-Marc Lasgouttes  <[EMAIL PROTECTED]>
+
+	* insettabular.C (doDispatch): do not override the result of
+	LFUN_RIGHT/LEFT. (bug 2101)
+
 2005-09-16  Michael Gerz  <[EMAIL PROTECTED]>
 
 	* insetvspace.C (metrics): compute ascent and descent in a way that
Index: src/insets/insettabular.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insettabular.C,v
retrieving revision 1.489
diff -u -p -r1.489 insettabular.C
--- src/insets/insettabular.C	19 Sep 2005 14:38:13 -0000	1.489
+++ src/insets/insettabular.C	20 Oct 2005 14:44:18 -0000
@@ -511,24 +511,24 @@ void InsetTabular::doDispatch(LCursor & 
 	case LFUN_RIGHTSEL:
 	case LFUN_RIGHT:
 		cell(cur.idx())->dispatch(cur, cmd);
-		cur.dispatched(); // override the cell's decision
-		if (sl == cur.top())
+		if (!cur.result().dispatched()) {
 			isRightToLeft(cur) ? movePrevCell(cur) : moveNextCell(cur);
-		if (sl == cur.top()) {
-			cmd = FuncRequest(LFUN_FINISHED_RIGHT);
-			cur.undispatched();
+			if (sl == cur.top()) 
+				cmd = FuncRequest(LFUN_FINISHED_RIGHT);
+			else
+				cur.dispatched();
 		}
 		break;
 
 	case LFUN_LEFTSEL:
 	case LFUN_LEFT:
 		cell(cur.idx())->dispatch(cur, cmd);
-		cur.dispatched(); // override the cell's decision
-		if (sl == cur.top())
+		if (!cur.result().dispatched()) {
 			isRightToLeft(cur) ? moveNextCell(cur) : movePrevCell(cur);
-		if (sl == cur.top()) {
-			cmd = FuncRequest(LFUN_FINISHED_LEFT);
-			cur.undispatched();
+			if (sl == cur.top()) 
+				cmd = FuncRequest(LFUN_FINISHED_LEFT);
+			else
+				cur.dispatched();
 		}
 		break;
 

Reply via email to