cursesport: fix bugs

Handle control characters (newline) as separate character.
Move check for valid cursor position before checking for multi-cell character.