Re: gv selects incorrectly after d, u
select text in a file with v and movement keys (make sure to have some lines both above and below your selection)
press d to delete
press u to undo
press gv to reselect the last visual area (the one you deleted and undoed).
Visual selection is not the same as that selected previously.