fix another cursesport bug

Check valid cursor after newline and check return value of newline()