mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-21 17:51:03 +00:00
Fix spacing problems in previews with math macros (#13120)
This occurs on the legacy path when no cropping tools are available.
This commit is contained in:
parent
b40aa80517
commit
9ffacb341d
@ -817,8 +817,11 @@ void InsetMathHull::usedMacros(MathData const & md, DocIterator const & pos,
|
|||||||
if (data) {
|
if (data) {
|
||||||
odocstringstream macro_def;
|
odocstringstream macro_def;
|
||||||
data->write(macro_def, true);
|
data->write(macro_def, true);
|
||||||
macro_def << endl;
|
// Empty lines will generate full rows
|
||||||
defs.insert(macro_def.str());
|
// with legacy preview and tightpage (#13120).
|
||||||
|
// So remove all preceding and trailing line breaks
|
||||||
|
// and re-add one at the end of the snippet
|
||||||
|
defs.insert(trim(macro_def.str(), "\n") + "\n");
|
||||||
asArray(data->definition(), ar);
|
asArray(data->definition(), ar);
|
||||||
}
|
}
|
||||||
usedMacros(ar, pos, macros, defs);
|
usedMacros(ar, pos, macros, defs);
|
||||||
|
Loading…
Reference in New Issue
Block a user