make sure comment box height and cursor position don't go too far when it's resizing, fixes #82