mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 21:40:19 +00:00
Set buffer_ correctly when inseting a math macro over a selection
The code that handles this special macro insertion (in
Cursor::mathMacroClose())) is very weird: it inserts the contents of
the macro _after_ the macro and later, since the macro is 'greedy', it
will eat this contents and put it in its first macro cell.
Does it make sense to you? It does not ake sense to me either. Anyway,
this is the point where one should make sure that the buffer is set.
Fixes ticket #12682.
(cherry picked from commit b45a957929
)
This commit is contained in:
parent
21096f696a
commit
13a34d6cd1
@ -1078,6 +1078,8 @@ void InsetMathMacro::attachArguments(vector<MathData> const & args, size_t arity
|
||||
{
|
||||
LASSERT(d->displayMode_ == DISPLAY_NORMAL, return);
|
||||
cells_ = args;
|
||||
for (auto & cell : cells_)
|
||||
cell.setBuffer(*buffer_);
|
||||
d->attachedArgsNum_ = args.size();
|
||||
cells_.resize(arity);
|
||||
d->expanded_ = MathData();
|
||||
|
@ -75,6 +75,8 @@ What's new
|
||||
|
||||
* INTERNALS
|
||||
|
||||
- Fix case where insets do not have proper information about current buffer
|
||||
(bug 12682).
|
||||
|
||||
|
||||
* DOCUMENTATION AND LOCALIZATION
|
||||
|
Loading…
Reference in New Issue
Block a user