Fix for Spaces

Cursor position based space detection added..previous code does not
detect 1X spaces