Preserve selection polarity better.

Hello @dpup, 

Please review the following commits I made in branch 'nick-ranges'.

9a2579f74dbc6e1b1a57bdea77100dd37b0cb1b4 (2013-06-27 17:49:24 -0400)
Preserve selection polarity better.


R=@dpup