I want to underline some code in my source code included using listings
. I did the following but the underline is including the white space before the statement. How could I do it so that it only underlines "return 0"?
\lstset{
language=C,
basicstyle=\ttfamily,
moredelim=[is][\underbar]{_}{_},
}
\begin{lstlisting}
int main() {
_return 0_;
}
\end{lstlisting}