Skip to content

Commit

Permalink
fix(editor): wrong adjusted scroll position after scaling in wordwrap
Browse files Browse the repository at this point in the history
  • Loading branch information
Rosemoe committed Feb 17, 2024
1 parent 0667e05 commit 8655164
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3040,7 +3040,7 @@ public void setLayoutBusy(boolean busy) {
int column = IntPair.getSecond(touchHandler.memoryPosition);
// Compute new scroll position
var row = ((WordwrapLayout) layout).findRow(line, column);
var afterScrollY = row * getRowHeight() - getHeight() + touchHandler.focusY;
var afterScrollY = row * getRowHeight() - touchHandler.focusY;
var scroller = touchHandler.getScroller();
dispatchEvent(new ScrollEvent(this, scroller.getCurrX(),
scroller.getCurrY(), 0, (int) afterScrollY, ScrollEvent.CAUSE_SCALE_TEXT));
Expand Down

0 comments on commit 8655164

Please sign in to comment.