John Levon wrote:

> On Thu, Dec 12, 2002 at 06:59:42PM +0200, Dekel Tsur wrote:
> 
>> Yes, the problem is only with cursor down.
> 
> I careated a bug for this. Thankfully, it's not a 1.3 regression
> 

After some disentangling, I think I've found the reason (insetext not 
returning DISPATCHED after its child processed the event). I've tested it a 
little and seems to work nicely. Please test (patch).

patch2 corrects the inversion of LFUN_WORDFINDBACKWARD and 
LFUN_WORDFINDFORWARD.
Index: insettext.C
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/insets/insettext.C,v
retrieving revision 1.336
diff -u -r1.336 insettext.C
--- insettext.C	2002/11/27 10:30:26	1.336
+++ insettext.C	2002/12/14 17:37:07
@@ -1221,20 +1221,10 @@
 				}
 				break;
 			case FINISHED_DOWN:
-			{
-				LyXText *lt = getLyXText(bv);
-				if (lt->cursor.irow()->next()) {
-					lt->setCursorFromCoordinates(
-						bv, lt->cursor.ix() + inset_x,
-						lt->cursor.iy() -
-						lt->cursor.irow()->baseline() +
-						lt->cursor.irow()->height() + 1);
-					lt->cursor.x_fix(lt->cursor.x());
+				if ((result = moveDown(bv)) >= FINISHED) {
 					updateLocal(bv, CURSOR, false);
-				} else {
 					bv->unlockInset(this);
 				}
-			}
 				break;
 			default:
 				result = DISPATCHED;
Index: lyxfunc.C
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/lyxfunc.C,v
retrieving revision 1.386
diff -u -r1.386 lyxfunc.C
--- lyxfunc.C	2002/12/12 13:46:05	1.386
+++ lyxfunc.C	2002/12/13 14:33:46
@@ -896,7 +896,7 @@
 		} else {
 			searched_string = last_search;
 		}
-		bool fw = (action == LFUN_WORDFINDBACKWARD);
+		bool fw = (action == LFUN_WORDFINDFORWARD);
 		if (!searched_string.empty()) {
 			lyxfind::LyXFind(view(), searched_string, fw);
 		}

Reply via email to