I use listings package (the newest version 1.8b), but in the following case it doesn't work correctly:
\documentclass{article}
\usepackage{listings}
\begin{document}
\section{Title}
\begin{lstlisting}
lstlisting content
\end{lstlisting}
text
\section{Title}
text
\begin{lstlisting}
lstlisting content
\end{lstlisting}
text
\section{Title}
text
\end{document}
There wasn't this problem in the previously versions. Is this a bug?