This was an obvious thinko: When pasting a paragraph list the depth of the
pasted paragraphs need to be adjusted, so that no paragraph has a negative
depth afterwards. However, the maximum allowed depth was only adjusted after
the second and following pasted paragraphs. Since the computed value was only
used for the subsequent paragrph this meant that the second paragraph did
still use the same maximum allowed depth as the first one, which came from the
paragraph the text as pasted into. This was wrong e.g. in case the outside
paragraph was a standard paragraph (max_depth = 0), and the first pasted
paragraph was an enumeration (max_depth = 1). Therefore, max_depth needs to
be adjusted also after the first pasted paragaph. Since the adjustment is
done aftre max_depth was used for the current paragraph the condition
mentioned in the comment is still met.
Now interactive insertion of \smash[t] and \smash[b] is possible again.
\smash with optional argument behaves now exactly as in LyX 2.0.x, and without
optional argument it is supported by InsetMathPhantom.
I should have had a closer look much earlier, since the fix is simple and
safe, but at that time I did not notice. The problem was that an invalid
.lyx document was created when converting unicode characters with two
backslashes in their LaTeX definition from lib/unicodesymbols to pre-unicode
LyX format.
When adding native support for \smash in 18779013 I overlooked that amsmath
redefines \smash to take an optional argument t or b. These optional
arguments are not parsed correctly anymore (bug 8967). This change fixes
the regression, so that \smash with optional argument appears in red, as it
was before th introduction of the native smash inset.
In the future, we should have native support for \smash[t] and \smash[b]
as well, but this would be a file format change (automatic amsmath loading),
and it is too late for 2.1.0.
The frame decoration IconPalette contains already \overset etc. and \sideset has the same logic like \over- and \underset. Moreover we should keep the math panel clean and avoid the listing of many very special commands
the minibuffer. As the comments explain, this leaves a different
bug, but (a) it isn't a crash and (b) it probably won't affect
many users, if *any* users.