mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-12 22:14:35 +00:00
Make sure to add at least one element in row if possible
breakRow should only produce an empty row when there is nothing left
in the paragraph.
Fixes bug #10996.
(cherry picked from commit 253b935f65
)
This commit is contained in:
parent
34c1b3c42c
commit
19c90f3a89
@ -852,7 +852,7 @@ bool TextMetrics::breakRow(Row & row, int const right_margin) const
|
||||
// or the end of the par, then build a representation of the row.
|
||||
pos_type i = pos;
|
||||
FontIterator fi = FontIterator(*this, par, row.pit(), pos);
|
||||
while (i < end && row.width() <= width) {
|
||||
while (i < end && (i == pos || row.width() <= width)) {
|
||||
char_type c = par.getChar(i);
|
||||
// The most special cases are handled first.
|
||||
if (par.isInset(i)) {
|
||||
|
Loading…
Reference in New Issue
Block a user