@@ -9330,27 +9330,33 @@ public void setLineVerticalIndent(int lineIndex, int verticalLineIndent) {
93309330 if (verticalScrollbar != null ) {
93319331 verticalScrollbar .setMaximum (verticalScrollbar .getMaximum () + verticalIndentDiff );
93329332 }
9333- } else {
9334- resetCache (lineIndex , 1 );
9335- if ((initialTopIndex == 0 ) && (initialBottomIndex == (content .getLineCount () - 1 ))) { // not scrollable editor
9336- setCaretLocations ();
9337- redrawLines (lineIndex , getBottomIndex () - lineIndex + 1 , true );
9338- } else if (getFirstCaretLine () >= initialTopIndex && getFirstCaretLine () <= initialBottomIndex ) { // caret line with caret mustn't move
9339- if (getFirstCaretLine () < lineIndex ) {
9340- redrawLines (lineIndex , getPartialBottomIndex () - lineIndex + 1 , true );
9341- } else {
9342- setTopPixel (initialTopPixel + verticalIndentDiff );
9343- }
9344- } else { // move as few lines as possible
9345- if (lineIndex - getTopIndex () < getBottomIndex () - lineIndex ) {
9346- setTopPixel (initialTopPixel + verticalIndentDiff );
9347- } else {
9348- // redraw below
9349- redrawLines (lineIndex , getPartialBottomIndex () - lineIndex + 1 , true );
9350- }
9333+ }
9334+ redrawLines (lineIndex , initialTopIndex , initialBottomIndex , initialTopPixel , verticalIndentDiff );
9335+ }
9336+
9337+ private void redrawLines (int lineIndex , int initialTopIndex , int initialBottomIndex , int initialTopPixel ,
9338+ int verticalIndentDiff ) {
9339+ resetCache (lineIndex , 1 );
9340+ if ((initialTopIndex == 0 ) && (initialBottomIndex == (content .getLineCount () - 1 ))) { // not scrollable editor
9341+ setCaretLocations ();
9342+ redrawLines (lineIndex , getBottomIndex () - lineIndex + 1 , true );
9343+ } else if (getFirstCaretLine () >= initialTopIndex && getFirstCaretLine () <= initialBottomIndex ) { // caret line with
9344+ // caret mustn't
9345+ // move
9346+ if (getFirstCaretLine () < lineIndex ) {
9347+ redrawLines (lineIndex , getPartialBottomIndex () - lineIndex + 1 , true );
9348+ } else {
9349+ setTopPixel (initialTopPixel + verticalIndentDiff );
9350+ }
9351+ } else { // move as few lines as possible
9352+ if (lineIndex - getTopIndex () < getBottomIndex () - lineIndex ) {
9353+ setTopPixel (initialTopPixel + verticalIndentDiff );
9354+ } else {
9355+ // redraw below
9356+ redrawLines (lineIndex , getPartialBottomIndex () - lineIndex + 1 , true );
93519357 }
9352- setScrollBars (true );
93539358 }
9359+ setScrollBars (true );
93549360}
93559361
93569362/**
0 commit comments