Skip to content

Commit 6bd1921

Browse files
committed
fix: skip rendering empty token text
1 parent 299192e commit 6bd1921

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/mixins/canvas-drawer.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -514,6 +514,7 @@ function drawLines (firstRow, lastRow, offsetRow, lineHeight, charHeight, charWi
514514
const numTokenToRender = Math.min(numToken, maxTokensInOneLine)
515515
for (let iToken = 0; iToken < numTokenToRender; iToken++) {
516516
const token = editorTokensForScreenRow[iToken]
517+
if (token.text === '') { continue }
517518
const tokenText = token.text.replace(invisibleRegExp, ' ')
518519
const tokenScopes = token.scopes
519520

0 commit comments

Comments
 (0)