Fixed edge case where there are separator chars at start of line.

lethosor found issue when there are separator chars at beginning of
line.  The code didn't allow the cursor at position 0.

Fixed the while loop to break out when pos is at the first char of
word. No need to fixing the position afterwards like the original
loop.  So the cursor can now go to pos 0 even when it contains a
separator character.