bobbylight / RSyntaxTextArea

A syntax highlighting, code folding text editor for Java Swing applications.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ErrorStrip mouse click => navigation issue

DrDaleks opened this issue · comments

Description
Clicking in the error strip does not browse to the proper document location. The error strip should represent the full document, independently of its actual size in the viewport, but it seems the calculation back from error strip's mouse click position to document location is incorrect.

Steps to Reproduce
Specific steps to reproduce the behavior:

  1. Fire up a TextEditorPane with an ErrorStrip on its side (right side in my case)
  2. Load a document that is larger than the current viewport
  3. Click on the error strip to navigate (preferably near the bottom to maximise the effect)

NB: this issue does not apply to markers.

Expected behavior
Navigating to the proper location (bottom of error strip should show bottom of document)

Actual behavior
The caret moves indeed but seems to remain close to the top of the document

Java version
LibericaVM-17

Additional context
This issue does not apply to markers and seems to be related to the calculation in ErrorStrip.yToLine(int) method

Fixed in linked PR #497. Thanks again!