Make url hash is consistent with ranges, ctrl/cmd toggles single lines properly

This fix is for bugs #991990 & #991991, and some spelling too.