mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
Now the cursor moves when the line is changed after a long line
This commit is contained in:
@@ -563,11 +563,11 @@ public class JEditTextArea extends JComponent
|
||||
int width = painter.getFontMetrics().charWidth('w');
|
||||
|
||||
if(x < 0) {
|
||||
newHorizontalOffset = Math.min(0,horizontalOffset - x + width + 5);
|
||||
newHorizontalOffset = Math.max(0,horizontalOffset - x + width + 5);
|
||||
} else if(x + width >= painter.getWidth()) {
|
||||
newHorizontalOffset = horizontalOffset +
|
||||
(painter.getWidth() - x) - width - 5;
|
||||
}
|
||||
}
|
||||
|
||||
return setOrigin(newFirstLine,newHorizontalOffset);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user