Skip to content

Commit 3751762

Browse files
MatanZNadeem Anwar
authored andcommitted
Start first text run after the last column of bitmap, instead on the last column.
This creates a zero length text run, so skip it.
1 parent 693404f commit 3751762

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

terminal-view/src/main/java/com/termux/view/TerminalRenderer.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ public final void render(TerminalEmulator mEmulator, Canvas canvas, int topRow,
115115
measuredWidthForRun = 0.f;
116116
lastRunStyle = 0;
117117
lastRunInsideCursor = false;
118-
lastRunStartColumn = column;
118+
lastRunStartColumn = column + 1;
119119
lastRunStartIndex = currentCharIndex;
120120
lastRunFontWidthMismatch = false;
121121
currentCharIndex += charsForCodePoint;
@@ -134,7 +134,7 @@ public final void render(TerminalEmulator mEmulator, Canvas canvas, int topRow,
134134
final boolean fontWidthMismatch = Math.abs(measuredCodePointWidth / mFontWidth - codePointWcWidth) > 0.01;
135135

136136
if (style != lastRunStyle || insideCursor != lastRunInsideCursor || insideSelection != lastRunInsideSelection || fontWidthMismatch || lastRunFontWidthMismatch) {
137-
if (column == 0) {
137+
if (column == 0 || column == lastRunStartColumn) {
138138
// Skip first column as there is nothing to draw, just record the current style.
139139
} else {
140140
final int columnWidthSinceLastRun = column - lastRunStartColumn;

0 commit comments

Comments
 (0)