]> git.lyx.org Git - features.git/commit
Position better the cursor after math-display
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 8 Jul 2015 09:01:42 +0000 (11:01 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 9 Jul 2015 10:00:25 +0000 (12:00 +0200)
commit7d018853fca43fd16f6df3d27a3311d37d9e5ef4
tree604ab0a3b2bac04c54ce12762ca37ce1f0f23eb7
parent2a7deb802a6f0fb61f5570bc000a5137534010e1
Position better the cursor after math-display

When the cursor had idx > 0 (since math-display does merging anyways),
reset cursor to the start of the inset. This looks less strange than
setting it at the end.

Now at least the basic case of a displayed equation with cursor
somewhere at top-level is handled correctly.

The math-display lfun operates at top level in the math inset.
Therefore, when the cursor is in an inner inset, it will after the
lfun be moved at top level. Unfortunately, there is no way that I know
f to detect this in Inset::doDispatch.

Even if we could, as things stand, it is difficult to keep the cursor in the
inner inset, especially if the inner inset moves : this happens for
example when moving from eqnarray to inline maths.

Therefore this fix is the best I can think of now.

Fixes part of bug #9664.
src/mathed/InsetMathHull.cpp