mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
Avoid an assertion.
Do not assert if an inset separator is the only item of a List environment. Although it is a weird thing to do, both GUI and latex output can deal with it.
This commit is contained in:
parent
0212ef5426
commit
061509bf75
@ -695,13 +695,13 @@ int TextMetrics::labelFill(pit_type const pit, Row const & row) const
|
|||||||
Paragraph const & par = text_->getPar(pit);
|
Paragraph const & par = text_->getPar(pit);
|
||||||
|
|
||||||
pos_type last = par.beginOfBody();
|
pos_type last = par.beginOfBody();
|
||||||
LBUFERR(last > 0);
|
LBUFERR(last > 0 || par.isEnvSeparator(0));
|
||||||
|
|
||||||
// -1 because a label ends with a space that is in the label
|
// -1 because a label ends with a space that is in the label
|
||||||
--last;
|
--last;
|
||||||
|
|
||||||
// a separator at this end does not count
|
// a separator at this end does not count
|
||||||
if (par.isLineSeparator(last))
|
if (last >= 0 && par.isLineSeparator(last))
|
||||||
--last;
|
--last;
|
||||||
|
|
||||||
int w = 0;
|
int w = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user