mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-26 19:25:39 +00:00
Revert part of 503c7c16
: InsetMathNest:edit resets anchor.
Fixes bug reported here: https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg217265.html 1. Start a new document. 2. Start a math inset and inside put "1+2". 3. Put the cursor to the right of "+". 4. Press <Shift> + L three times. This will select the entire math inset (as expected). 5. Press <Shift> + R. Before503c7c16
, the selection inside the math inset was preserved. After503c7c16
, it is lost. The problem is that InsetMathNest does too much for our needs and resets the anchor (why, I do not know). Therefore, it is better to duplicate the code.
This commit is contained in:
parent
b9ca608c2f
commit
307a2f91ad
@ -2254,7 +2254,10 @@ void InsetMathHull::handleFont2(Cursor & cur, docstring const & arg)
|
||||
|
||||
void InsetMathHull::edit(Cursor & cur, bool front, EntryDirection entry_from)
|
||||
{
|
||||
InsetMathNest::edit(cur, front, entry_from);
|
||||
cur.push(*this);
|
||||
bool enter_front = (entry_from == Inset::ENTRY_DIRECTION_LEFT ||
|
||||
(entry_from == Inset::ENTRY_DIRECTION_IGNORE && front));
|
||||
enter_front ? idxFirst(cur) : idxLast(cur);
|
||||
// The inset formula dimension is not necessarily the same as the
|
||||
// one of the instant preview image, so we have to indicate to the
|
||||
// BufferView that a metrics update is needed.
|
||||
|
Loading…
Reference in New Issue
Block a user