mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-10 20:04:46 +00:00
Reset cursor font when entring an inset with char-forward/backward
When entering an inset from the keyboard, setCurrentFont() was not called and thus the cursor retained the font that was set before. This could create strange behavior that could often go unnoticed by the user. It is easy to imagine many other situations similar to #9597 where the user could trigger this bug. Fixes bug #9597.
This commit is contained in:
parent
0f4c5df9f4
commit
7675a81949
@ -614,6 +614,7 @@ bool Text::checkAndActivateInset(Cursor & cur, bool front)
|
|||||||
if (!front)
|
if (!front)
|
||||||
--cur.pos();
|
--cur.pos();
|
||||||
inset->edit(cur, front);
|
inset->edit(cur, front);
|
||||||
|
cur.setCurrentFont();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -632,6 +633,7 @@ bool Text::checkAndActivateInsetVisual(Cursor & cur, bool movingForward, bool mo
|
|||||||
return false;
|
return false;
|
||||||
inset->edit(cur, movingForward,
|
inset->edit(cur, movingForward,
|
||||||
movingLeft ? Inset::ENTRY_DIRECTION_RIGHT : Inset::ENTRY_DIRECTION_LEFT);
|
movingLeft ? Inset::ENTRY_DIRECTION_RIGHT : Inset::ENTRY_DIRECTION_LEFT);
|
||||||
|
cur.setCurrentFont();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user