Skip to content

Commit 55460b3

Browse files
authored
Merge pull request #813 from mzivic7/fix_blank_line
Fix blank lines being ignored
2 parents c0e2b55 + 56f1687 commit 55460b3

9 files changed

+20
-14
lines changed

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,5 @@ npm-debug.log
33
node_modules
44
.live-archive
55
pages
6-
dist
76
.parcel-cache
8-
package-lock.json
7+
package-lock.json

dist/main.js

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/main.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/minimap-plugin-generator-element.68264bbd.js

Lines changed: 0 additions & 2 deletions
This file was deleted.

dist/minimap-plugin-generator-element.68264bbd.js.map

Lines changed: 0 additions & 1 deletion
This file was deleted.

dist/minimap-plugin-generator-element.f5282bf9.js

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/minimap-plugin-generator-element.f5282bf9.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/mixins/canvas-drawer.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -695,17 +695,19 @@ function drawLines(
695695
const editorTokensForScreenRow = editor.tokensForScreenRow(line)
696696
const numToken = editorTokensForScreenRow.length
697697
const numTokenToRender = Math.min(numToken, maxTokensInOneLine)
698+
699+
if (lastLine !== line) {
700+
x = 0
701+
y += lineHeight
702+
lastLine = line
703+
context.clearRect(x, y, canvasWidth, lineHeight)
704+
}
705+
698706
for (let iToken = 0; iToken < numTokenToRender; iToken++) {
699707
const token = editorTokensForScreenRow[iToken]
700708
const tokenText = token.text.replace(invisibleRegExp, " ")
701709
const tokenScopes = token.scopes
702710

703-
if (lastLine !== line) {
704-
x = 0
705-
y += lineHeight
706-
lastLine = line
707-
context.clearRect(x, y, canvasWidth, lineHeight)
708-
}
709711
if (x > canvasWidth) {
710712
continue
711713
}

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,8 @@
8989
"fs-plus": false
9090
},
9191
"outputFormat": "commonjs",
92-
"isLibrary": true
92+
"isLibrary": true,
93+
"optimize": true
9394
}
9495
},
9596
"viewProviders": [

0 commit comments

Comments
 (0)