Use mouse vs caret position

The goal of this feature is to extend the selection to the mouse
position.  Looking at the caret position just tells us where the caret
is, not the mouse

close #1406
Fixed: :tablast was implemented as :tabfirst

Also added missing unit tests. This fixes #1172.