The suggestion in #10 is not sufficient. \needspace needs to work like \addpenalty / \addvspace, that is inspect a previous vertical skip, back up, does its work and then readd the space that was backed up so that a following \addvspace can interact with the space.
It is debatable if after backing up one needs to enlarge the requested space.
MWE showing the problem:
\documentclass{article}
\usepackage{needspace}
\begin{document}
\section{no needspace}
\begin{itemize}
\item x \item x \item x \item x
\end{itemize}
\begin{itemize}
\item y \item y \item y \item y
\end{itemize}
\newpage
\section{with needspace}
\begin{itemize}
\item x \item x \item x \item x
\end{itemize}
\needspace{1cm}
\begin{itemize}
\item y \item y \item y \item y
\end{itemize}
\newpage
\section{with Needspace}
\begin{itemize}
\item x \item x \item x \item x
\end{itemize}
\Needspace{1cm}
\begin{itemize}
\item y \item y \item y \item y
\end{itemize}
\end{document}
The suggestion in #10 is not sufficient. \needspace needs to work like \addpenalty / \addvspace, that is inspect a previous vertical skip, back up, does its work and then readd the space that was backed up so that a following \addvspace can interact with the space.
It is debatable if after backing up one needs to enlarge the requested space.
MWE showing the problem:
Result:
test-needspace.pdf