mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
Fix loop while separating
getMaxDepthAfter() gives wrong result here.
Fixes: #10979
Signed-off-by: Juergen Spitzmueller <spitz@lyx.org>
(cherry picked from commit bceaa7f929
)
This commit is contained in:
parent
1702e76a1f
commit
9b603d90c8
@ -1555,9 +1555,9 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
|
||||
if ((outer || normal) && nextpar_depth > 0) {
|
||||
// restore nesting of following paragraph
|
||||
DocIterator scur = cur;
|
||||
depth_type const max_depth = cur.paragraph().getMaxDepthAfter();
|
||||
depth_type const max_depth = cur.paragraph().params().depth() + 1;
|
||||
cur.forwardPar();
|
||||
while (cur.paragraph().params().depth() <= min(nextpar_depth, max_depth))
|
||||
while (cur.paragraph().params().depth() < min(nextpar_depth, max_depth))
|
||||
lyx::dispatch(FuncRequest(LFUN_DEPTH_INCREMENT));
|
||||
cur.setCursor(scur);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user