# Lstlisting delimiters remove indentation

I am trying to change color of text in the listing. I use delimiters, but it seems that they remove indentation.

Here is my setup:

\usepackage{listings}
\usepackage{color}

\definecolor{javared}{rgb}{0.6,0,0} % for strings
\definecolor{javapurple}{rgb}{0.5,0,0.35} % keywords

\lstset{language=Java,
basicstyle=\small\ttfamily,
frame=single,
breaklines=true,
columns=fullflexible,
keywordstyle=\color{javapurple}\bfseries,
stringstyle=\color{javared},
tabsize=4,
showspaces=false,
showstringspaces=false,
escapeinside={(*@}{@*)},
moredelim=[il][\textcolor{pyellow}]{},
moredelim=[is][\textcolor{pgrey}]{\%\%}{\%\%},
moredelim=[is][\color{red}]{|}{|},
moredelim=[is][\color{green}]{#}{#}
}

\begin{lstlisting}
|+      THIS SHOULD BE GREEN|
#-      THIS SHOULD BE RED#
\end{lstlisting}


This is output with missing indentation:

Are my settings correct? Is there any way to keep indentation or insert it?

Beside the spacing problem, note that the # character in LaTeX has a special meaning and so needs to be escaped when used as a delimiter for listings. Your last delimiter definition should thus read
moredelim=[is][\color{green}]{\#}{\#}

The missing spaces occur because you are using the option columns=fullflexible. For column alignment, listings has four options, namely fixed, flexible, spaceflexible and fullflexible. The differences between them are described in section 2.10 of the listings manual.
For longer, monospaced listings you probably want to use the fixed or flexible format. The effects of the four options on your example can be seen in the following image: