Handle in-text anchor links consistently with Outline plugin

Use case or problem

When I click to a heading in the Outline plugin’s pane, I jump to the heading and just that heading is selected. So the screen will be at the start of the section.

When I click an in-text anchor link (e.g. [[#Anchor]]), I jump to the section, and the whole section is selected, with the screen at the end of the section. Especially on mobile this means having to scroll up to the start of the section.

Proposed solution

Have in-text anchor links link to a heading, instead of to the whole section.

As a solution, I would propose leaving the whole section selected, but making sure that the scroll is at the top instead of the bottom.