mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
Redo metrics after cancelling macro mode
When the cursor is inside a subscript that may become empty, metrics
issues can happen. This patch fixes the issue, although it is not
clear to see what the problem is.
Still, requesting a metrics update also in the case where the macro
mode is canceled makes sense.
Fixes bug #11125.
(cherry picked from commit 68ec34e603
)
This commit is contained in:
parent
4f0504d778
commit
d0a11cb8e2
@ -1412,14 +1412,15 @@ bool Cursor::macroModeClose(bool cancel)
|
||||
--pos();
|
||||
cell().erase(pos());
|
||||
|
||||
// do nothing if the macro name is empty
|
||||
if (s == "\\" || cancel)
|
||||
return false;
|
||||
|
||||
// trigger updates of macros, at least, if no full
|
||||
// updates take place anyway
|
||||
screenUpdateFlags(Update::Force);
|
||||
|
||||
// do nothing if the macro name is empty
|
||||
if (s == "\\" || cancel) {
|
||||
return false;
|
||||
}
|
||||
|
||||
docstring const name = s.substr(1);
|
||||
InsetMathNest * const in = inset().asInsetMath()->asNestInset();
|
||||
if (in && in->interpretString(*this, s))
|
||||
|
@ -219,6 +219,9 @@ What's new
|
||||
- When adding a label in the first paragraph after a division (section,
|
||||
etc), use the label prefix for it (bug 10624).
|
||||
|
||||
- Fix crash when canceling entry of macro name in a mathed subscript
|
||||
(bug 11125).
|
||||
|
||||
|
||||
* INTERNALS
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user