javalover520 / jsyntaxpane

Automatically exported from code.google.com/p/jsyntaxpane
0 stars 0 forks source link

Changing the contentType does not properly set line numbers #50

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Start SyntaxTester
2. Insert text (must have vertical scrolls)
3. Change content from drop-down list

What is the expected output? What do you see instead?
Line numbers on the top-left start from 1, not the number before the change.

Please use labels and text to provide additional information.
Release 0.9.4 - SVN r68.

Original issue reported on code.google.com by ayman.al...@gmail.com on 12 Jan 2009 at 7:48

GoogleCodeExporter commented 8 years ago
Almost no way of fixing this, within my current time-frames.
LineNumbers will almost always get the top (and start with 1).

The LineNumbersRuler paintComponent does not get the correct clip (seems like 
it is
always starting at y = 0), even if the initial display is scrolled down.

A work around is to set the caretPosition to the top when the contentType is 
changed.

Original comment by ayman.al...@gmail.com on 13 Jan 2009 at 7:09