Made the editor more reliable

Unfortunately this caused a bug that misplaces the highlighter by one on
the Y when on Y 0.