I get strange errors with the last versions of mdframed (v 1.4) and listings (v 1.4). Here is a minimal example:
\documentclass{minimal}
\usepackage{mdframed}
\usepackage{listings}
\begin{document}
\begin{mdframed}
\begin{lstlisting}
blah
\end{lstlisting}
bloh
\end{mdframed}
\end{document}
The error I get is
You can't use
\prevdepthin horizontal mode.
which I don't really understand... Any pointer as to what is going on would be greatly appreciated.

lstlistingwithin\begin{minipage}{\linewidth} ... \end{minipage}. – Peter Grill Mar 22 '12 at 21:44\makeatletter\let\par\@@par\makeatotherjust below\end{lstlisting}(it seems that this environment doesn't reset\parto its expected value). – egreg Mar 22 '12 at 22:13listingscan't be splitted. – Marco Daniel Mar 23 '12 at 12:44