mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
Revert "Set buffer when expanding macro"
This patch is not ready yet. Moreover, change the assertion in
InsetMathGrid::colAlign to a simple test.
As a consequence, math split inset might show a bad alignment in some
situations.
This reverts commit d3fd915662
.
This commit is contained in:
parent
aaf96b3025
commit
0310dcb19e
@ -1853,9 +1853,10 @@ char InsetMathGrid::colAlign(HullType type, col_type col) const
|
||||
case hullMultline:
|
||||
return 'c';
|
||||
case hullGather:
|
||||
LASSERT(isBufferValid(),
|
||||
LYXERR0("Buffer not set correctly. Please report!");
|
||||
return 'c';);
|
||||
if (!isBufferValid()) {
|
||||
LYXERR0("Buffer not set correctly. Please report!");
|
||||
return 'c';
|
||||
}
|
||||
if (buffer().params().is_math_indent)
|
||||
return 'l';
|
||||
else
|
||||
|
@ -669,9 +669,8 @@ 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();
|
||||
bool const ret = d->macro_->expand(values, d->expanded_);
|
||||
d->expanded_.setBuffer(buffer());
|
||||
if (ret && !support::contains(display, latexname)) {
|
||||
if (d->macro_->expand(values, d->expanded_)
|
||||
&& !support::contains(display, latexname)) {
|
||||
if (utype == OutputUpdate && !d->expanded_.empty())
|
||||
d->expanded_.updateMacros(cur, mc, utype, nesting);
|
||||
}
|
||||
|
@ -153,11 +153,9 @@ What's new
|
||||
|
||||
- Fix bad caret position when row scrolls horizontally (bug 11603).
|
||||
|
||||
- Fix crash when inserting some macros (bug 11686).
|
||||
- Fix crash when inserting some insets in math split insets (bug 11686).
|
||||
|
||||
- Avoid future crashes with math split insets by adding an extra test.
|
||||
|
||||
- Properly remember cursor posoiton when many files have been opened
|
||||
- Properly remember cursor position when many files have been opened
|
||||
(bug 10310).
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user