mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
Do note attempt to nest more than possible.
(cherry picked from commit 32efb91438
)
This commit is contained in:
parent
7668633b94
commit
cf97ec4a21
@ -1554,8 +1554,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