Smarted range selection. See #20