You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Windows 7 64bit
Scrollbar disappears on long strings in the editor eg.
1.type something long no enters or spaces like ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss
2. scroll as far as you can let go scrollbar disappears
From f...@processing.org on July 16, 2010 11:20:03
Nuts, hadn't seen that one for a while, so we had closed up the bug. But this description at least gives me something to test against. Thanks.
If cursor is off-screen (left side) when the horizontal scroll bar disappears, arrowing down causes cursor to stay on first visible position on left until reaching a line that is entirely off-screen, (which restores the scroll bar).
It's not always necessary to move scroll bar all the way to the right before it disappears.
Sometimes, instead of disappearing, scroll bar grows when it is dropped, filling the scroll area. Scroll bar consistently disappears when it reaches the right side.
From f...@processing.org on October 15, 2010 19:06:05
Use the line from comment #1, and put the caret at the end of the line and it'll disappear (until you move the caret to about the middle of the line).
From Chris.Lonnen on October 18, 2010 15:52:43
The scroll bar issue occurs because of bad values set through horizontal.setValues(), which was added to JEditTextArea in order to fix bug 280. When the ((newValue + newExtent) > newMax) the BoundedRangeModel inside the JScrollBar tries to coerce the values to obey "minimum <= value <= value+extent <= maximum", which appears to be causing the problem. I'm working out a fix now.
From f...@processing.org on October 18, 2010 16:00:59
Right, so that'll be part of it. It still disappears even without the issue 280 regression, though it's tougher to reproduce, see issue 10.
From Chris.Lonnen on October 18, 2010 16:51:00
Looking at Christian's old fix I've worked out:
//setValues(int newValue, int newExtent, int newMin, int newMax)
horizontal.setValues(-horizontalOffset, painterWidth, -charWidth, width + charWidth);
Which fixes the both the disappearing left hand gutter and the the disappearing scroll bar for me. The use of charWidth could be replaced with a separate gutterWidth variable; I'm using it here because it produces a gutter that scales with font changes.
The visibility of the scroll bar is never explicitly modified, and the updateScrollBars() method contains the only change to values of the horizontal scroll bar, so it would follow that the intermittent issue 10 is also caused by values being passed there. We could throw in an if statement to catch strange values and print a better error or write our own scaling to make sure that no strange values are passed.
In processing.app.Editor, line 184 reads: textarea.setHorizontalOffset(6);
The 6 here is the reason why I had two 6's in my comment on issue 280 – it's the initial left-hand gutter width, so it should also be updated to charWidth (or gutterWidth) as well.
From Chris.Lonnen on October 20, 2010 17:13:07
Thanks. I think we should introduce a static field into processing.app.syntax.JEditTextArea, something like 'public static final int leftHandGutter = 6;' Then change line 184 in Editor to textarea.setHorizontalOffset(JEditTextArea.leftHandGutter);
The issue at hand can be fixed by replacing line 302 with the following:
which will correctly update the horizontal bars when scrolling. The if() statement alters the values to re-establish the gutter if the window is positioned at the begging of the lines. Without the if() statement, the true block alone will put space in the scroll bar, and it will be revealed by manipulating the bar, but moving the cursor alone will position the starting char of the line as if there was no gutter.
Activity
processing-bugs commentedon Feb 10, 2013
From f...@processing.org on July 15, 2010 19:30:52
is this with 1.2.1?
processing-bugs commentedon Feb 10, 2013
From Adam.Sch...@gmail.com on July 15, 2010 19:34:11
1.2
processing-bugs commentedon Feb 10, 2013
From Adam.Sch...@gmail.com on July 15, 2010 19:36:00
just tried 1.2.1 yup
processing-bugs commentedon Feb 10, 2013
From f...@processing.org on July 16, 2010 11:20:03
Nuts, hadn't seen that one for a while, so we had closed up the bug. But this description at least gives me something to test against. Thanks.
processing-bugs commentedon Feb 10, 2013
From mkmori...@gmail.com on August 16, 2010 17:36:55
Related strangeness:
FWIW! (1.2.1, WinXP)
processing-bugs commentedon Feb 10, 2013
From peregue...@gmail.com on October 04, 2010 11:33:31
I can confirm I have the same issues with 1.2.1 and MAC OS 10.5
processing-bugs commentedon Feb 10, 2013
From Chris.Lonnen on October 15, 2010 18:50:35
Strangely, I cannot reproduce this on OSX 10.6.4
processing-bugs commentedon Feb 10, 2013
From f...@processing.org on October 15, 2010 19:06:05
Use the line from comment #1, and put the caret at the end of the line and it'll disappear (until you move the caret to about the middle of the line).
processing-bugs commentedon Feb 10, 2013
From Chris.Lonnen on October 15, 2010 19:26:46
I had to update from 0186 to 1.2.1, but I can confirm it on OSX 10.6.4 and I'm looking into it now.
processing-bugs commentedon Feb 10, 2013
From Chris.Lonnen on October 18, 2010 15:52:43
The scroll bar issue occurs because of bad values set through horizontal.setValues(), which was added to JEditTextArea in order to fix bug 280. When the ((newValue + newExtent) > newMax) the BoundedRangeModel inside the JScrollBar tries to coerce the values to obey "minimum <= value <= value+extent <= maximum", which appears to be causing the problem. I'm working out a fix now.
processing-bugs commentedon Feb 10, 2013
From f...@processing.org on October 18, 2010 16:00:59
Right, so that'll be part of it. It still disappears even without the issue 280 regression, though it's tougher to reproduce, see issue 10.
processing-bugs commentedon Feb 10, 2013
From Chris.Lonnen on October 18, 2010 16:51:00
Looking at Christian's old fix I've worked out:
//setValues(int newValue, int newExtent, int newMin, int newMax)
horizontal.setValues(-horizontalOffset, painterWidth, -charWidth, width + charWidth);
Which fixes the both the disappearing left hand gutter and the the disappearing scroll bar for me. The use of charWidth could be replaced with a separate gutterWidth variable; I'm using it here because it produces a gutter that scales with font changes.
The visibility of the scroll bar is never explicitly modified, and the updateScrollBars() method contains the only change to values of the horizontal scroll bar, so it would follow that the intermittent issue 10 is also caused by values being passed there. We could throw in an if statement to catch strange values and print a better error or write our own scaling to make sure that no strange values are passed.
processing-bugs commentedon Feb 10, 2013
From m...@christian-thiemann.de on October 18, 2010 18:55:54
One minor comment on this:
In processing.app.Editor, line 184 reads: textarea.setHorizontalOffset(6);
The 6 here is the reason why I had two 6's in my comment on issue 280 – it's the initial left-hand gutter width, so it should also be updated to charWidth (or gutterWidth) as well.
processing-bugs commentedon Feb 10, 2013
From Chris.Lonnen on October 20, 2010 17:13:07
Thanks. I think we should introduce a static field into processing.app.syntax.JEditTextArea, something like 'public static final int leftHandGutter = 6;' Then change line 184 in Editor to textarea.setHorizontalOffset(JEditTextArea.leftHandGutter);
The issue at hand can be fixed by replacing line 302 with the following:
if ( (-horizontalOffset) > 0 ){
horizontal.setValues(-horizontalOffset, painterWidth, -leftHandGutter, width);
} else {
horizontal.setValues(-leftHandGutter, painterWidth, -leftHandGutter, width);
}
which will correctly update the horizontal bars when scrolling. The if() statement alters the values to re-establish the gutter if the window is positioned at the begging of the lines. Without the if() statement, the true block alone will put space in the scroll bar, and it will be revealed by manipulating the bar, but moving the cursor alone will position the starting char of the line as if there was no gutter.
processing-bugs commentedon Feb 10, 2013
From f...@processing.org on October 20, 2010 20:47:58
Yes, this looks good, thanks. Please check it in.
processing-bugs commentedon Feb 10, 2013
From Chris.Lonnen on October 20, 2010 21:40:09
Fixed in revision 7397.
github-actions commentedon Jun 18, 2021
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.