]> git.lyx.org Git - features.git/commitdiff
a fix for s&r
authorAlfredo Braunstein <abraunst@lyx.org>
Fri, 13 Feb 2004 09:50:18 +0000 (09:50 +0000)
committerAlfredo Braunstein <abraunst@lyx.org>
Fri, 13 Feb 2004 09:50:18 +0000 (09:50 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8429 a592a061-630c-0410-9148-cb99ea01b6c8

src/ChangeLog
src/cursor.C

index e822b80ea11a0bc1775bdd2e319d7651c1fa99b9..66cf1e442e568a45a48307ceff2c1528b14c992d 100644 (file)
@@ -1,3 +1,7 @@
+2004-02-13  Alfredo Braunstein  <abraunst@lyx.org>
+
+       * cursor.C (dispatch): restore current_ before returning
+
 2004-02-13  Alfredo Braunstein  <abraunst@lyx.org>
 
        * text2.C (cursorUp, cursorDown): fix coords
index 9c53dd5e0fd190b24c73b73ce24158efec7b9b7c..4cdb780ad71d24f704b553fa57516dacc07ac1cf 100644 (file)
@@ -83,8 +83,11 @@ DispatchResult LCursor::dispatch(FuncRequest const & cmd0)
        FuncRequest cmd = cmd0;
        for (current_ = cursor_.size() - 1; current_ >= 1; --current_) {
                DispatchResult res = inset()->dispatch(*this, cmd);
-               if (res.dispatched())
+               if (res.dispatched()) {
+                       current_ = cursor_.size() - 1;
                        return DispatchResult(true, true);
+               }
+               
 
                // "Mutate" the request for semi-handled requests that need
                // additional handling in outer levels.
@@ -110,6 +113,7 @@ DispatchResult LCursor::dispatch(FuncRequest const & cmd0)
        BOOST_ASSERT(current_ == 0);
        DispatchResult res = bv_->text()->dispatch(*this, cmd);
        //lyxerr << "   result: " << res.val() << endl;
+       current_ = cursor_.size() - 1;
        return res;
 }