bobbylight / RSyntaxTextArea

A syntax highlighting, code folding text editor for Java Swing applications.
BSD 3-Clause "New" or "Revised" License
1.12k stars 259 forks source link

Cleaning & fixing the caret's line-to-Y logic #499

Closed DrDaleks closed 1 year ago

DrDaleks commented 1 year ago

Using existing code to compute line-to-Y position rather than manually. Simpler code that also properly aligns caret and marker painting for a same location.

bobbylight commented 1 year ago

This actually requires ErrorStrip.Marker.updateLocation() to call lineToY(line - 1) since Markers' lines are 1-based and the caret is 0-based.

bobbylight commented 1 year ago

Thanks for this! I'll make the tweak I mentioned above