fix #25852 Fixed assigning the end of a range selection
Fixed range ending for lasso select.