line-range-highlight: onclick handler and range selection
This allows the user to select line ranges simply by clicking on the
line number links.
- No selected highlit line, or a range already selected, causes the
click to highlight just the clicked line as usual.
- Clicking on a second line number link when a single line was already
highlit creates a line range highlight, between the lowest and
highest line numbers of the already-selected and newly-selected
line number links.
The order of the clicks is unimportant, you can click the higher
line number link first and then the lower to define the range of
lines equally well.
The implementation is slightly complicated by our single parent
onclick handler not being able to interrupt the already ongoing
processing of the a href #n change from the link click itself.
Rather than bloat every linenumber link with its own onclick handler
defeating this default we simply do it with a single parent
onclick event and apply any computed range url in the existing
hashchange event handler.