fix Cursor position not correct for partial entry