mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 05:16:21 +00:00
Set buffer when expanding macro
This avoids a crash in InsetMathSplit which uses the buffer() value. Fixes bug #11686.
This commit is contained in:
parent
58d22e0c6e
commit
19abf29ea0
@ -669,8 +669,9 @@ void InsetMathMacro::updateRepresentation(Cursor * cur, MacroContext const & mc,
|
||||
// than the one protected by UpdateLocker.
|
||||
docstring const & display = d->macro_->display();
|
||||
docstring const latexname = from_ascii("\\") + macroName();
|
||||
if (d->macro_->expand(values, d->expanded_)
|
||||
&& !support::contains(display, latexname)) {
|
||||
bool const ret = d->macro_->expand(values, d->expanded_);
|
||||
d->expanded_.setBuffer(buffer());
|
||||
if (ret && !support::contains(display, latexname)) {
|
||||
if (utype == OutputUpdate && !d->expanded_.empty())
|
||||
d->expanded_.updateMacros(cur, mc, utype, nesting);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user