Skip to content

Commit

Permalink
Remove space compensation for emojis.
Browse files Browse the repository at this point in the history
Turns out VSCode has some rendering issues in their integrated terminal, where emojis eat their next neighboring character. Let's not compensate for other peoples bugs and just wait for a fix. It's in the works I've heard.

xtermjs/xterm.js#1059
  • Loading branch information
mrtamagotchi committed Jun 7, 2019
1 parent febc16d commit 99722a6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/util/progress.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module.exports = progress = {

return percentage => {
const payloadPos = Math.ceil(path.length * (percentage / 100)) - 1
const newPath = path.substr(0, payloadPos) + payload + ' ' + path.substr(payloadPos + 1)
const newPath = path.substr(0, payloadPos) + payload + path.substr(payloadPos + 1)

earthFrame = earthFrame === 2 ? 0 : earthFrame + 1

Expand All @@ -19,7 +19,7 @@ module.exports = progress = {
pad += '\u00A0'
}

return home + ' ' + newPath + ' ' + earth[earthFrame] + pad + percentage + '%'
return home + ' ' + newPath + ' ' + earth[earthFrame] + pad + percentage + '%'
}
})()
}

0 comments on commit 99722a6

Please sign in to comment.