From: Jean-Marc Lasgouttes Date: Fri, 9 Nov 2018 05:22:04 +0000 (-0800) Subject: improve left/right navigation in root inset X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=3d95d0a72383e72ce801b5377b49d7b6a94bc74b;p=features.git improve left/right navigation in root inset Now the cursor is correctly set when changing cell with xursor left/right. --- diff --git a/src/mathed/InsetMathRoot.cpp b/src/mathed/InsetMathRoot.cpp index 565951114e..f4c8bf82ad 100644 --- a/src/mathed/InsetMathRoot.cpp +++ b/src/mathed/InsetMathRoot.cpp @@ -161,9 +161,9 @@ bool InsetMathRoot::idxForward(Cursor & cur) const // nucleus is 0 and is on the right if (cur.idx() == 0) return false; - else - cur.idx() = 0; + cur.idx() = 0; + cur.pos() = 0; return true; } @@ -173,9 +173,9 @@ bool InsetMathRoot::idxBackward(Cursor & cur) const // nucleus is 0 and is on the right if (cur.idx() == 1) return false; - else - cur.idx() = 1; + cur.idx() = 1; + cur.pos() = cur.lastpos(); return true; }