Skip to content

Commit

Permalink
Fix span recycling
Browse files Browse the repository at this point in the history
Fix italics display
  • Loading branch information
Rosemoe committed Oct 30, 2021
1 parent 81dc07c commit b7f9aa9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion editor/src/main/java/io/github/rosemoe/sora/data/Span.java
Original file line number Diff line number Diff line change
Expand Up @@ -167,11 +167,12 @@ public Span copy() {
copy.setUnderlineColor(underlineColor);
copy.problemFlags = problemFlags;
copy.renderer = renderer;
copy.fontStyles = fontStyles;
return copy;
}

public boolean recycle() {
problemFlags = colorId = column = underlineColor = 0;
problemFlags = colorId = column = underlineColor = fontStyles = 0;
renderer = null;
return cacheQueue.offer(this);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1704,7 +1704,7 @@ protected void drawRows(Canvas canvas, float offset, LongArrayList postDrawLineN
}
}
} else {
paintingOffset = offset + mRenderer.drawLineHardwareAccelerated(canvas, line, offset);
paintingOffset = offset + mRenderer.drawLineHardwareAccelerated(canvas, line, offset) - mDpUnit * 20;
lastVisibleChar = columnCount;
}

Expand Down

0 comments on commit b7f9aa9

Please sign in to comment.