From: Jean-Marc Lasgouttes Date: Fri, 21 Oct 2005 08:16:12 +0000 (+0000) Subject: fix bug 2101: Any character followed by Right Arrow moves the cursor to the next... X-Git-Tag: 1.6.10~13827 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=e70927a96c398b25632ead10f3775deba0f96cc6;p=lyx.git fix bug 2101: Any character followed by Right Arrow moves the cursor to the next cell git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10563 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/insets/ChangeLog b/src/insets/ChangeLog index 2ce3d45295..538441aace 100644 --- a/src/insets/ChangeLog +++ b/src/insets/ChangeLog @@ -1,3 +1,8 @@ +2005-10-20 Jean-Marc Lasgouttes + + * insettabular.C (doDispatch): do not override the result of + LFUN_RIGHT/LEFT. (bug 2101) + 2005-09-16 Michael Gerz * insetvspace.C (metrics): compute ascent and descent in a way that diff --git a/src/insets/insettabular.C b/src/insets/insettabular.C index 891f4eea0a..ee709f4c56 100644 --- a/src/insets/insettabular.C +++ b/src/insets/insettabular.C @@ -511,24 +511,24 @@ void InsetTabular::doDispatch(LCursor & cur, FuncRequest & cmd) 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;