integrated-application-development / delphilint

Delphi IDE package providing on-the-fly code analysis and linting, powered by SonarDelphi
GNU Lesser General Public License v3.0
79 stars 9 forks source link

Center issue position on screen when using double click navigation #19

Closed fourls closed 5 months ago

fourls commented 5 months ago

Double clicking an issue in the issue view currently moves the cursor to the line the issue is on. While this is better than nothing, it can sometimes be difficult to notice as the IDE scrolls the bare minimum amount needed to view the line - meaning that it's usually the top or bottom line in the editor.

This PR changes this behaviour to:

  1. Move the cursor to the column, as well as the line (this was broken due to a typo), and
  2. Scroll upwards so the line is vertically centered in the editor.