commit ee9451aaf58d15e82b1e25eea13a11a6b4906cad Author: Jean-Marc Lasgouttes <lasgout...@lyx.org> Date: Thu Nov 8 21:22:04 2018 -0800
improve left/right navigation in root inset Now the cursor is correctly set when changing cell with xursor left/right. --- src/mathed/InsetMathRoot.cpp | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mathed/InsetMathRoot.cpp b/src/mathed/InsetMathRoot.cpp index 5659511..f4c8bf8 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; }