mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-08 10:51:03 +00:00
Do note attempt to nest more than possible.
This commit is contained in:
parent
03b6ee9f06
commit
32efb91438
@ -1566,8 +1566,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();
|
||||
cur.forwardPar();
|
||||
while (cur.paragraph().params().depth() < nextpar_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