emoji support (fixes #35)

This commit is contained in:
Eugene Pankov 2017-07-03 18:21:12 +02:00
parent 052c941275
commit 06b60b86f2
2 changed files with 10 additions and 1 deletions

View File

@ -27,3 +27,12 @@ preferenceManager.set('color-palette-overrides', {
})
hterm.hterm.Terminal.prototype.showOverlay = () => null
const oldCharWidthDisregardAmbiguous = hterm.lib.wc.charWidthDisregardAmbiguous
hterm.lib.wc.charWidthDisregardAmbiguous = codepoint => {
if ((codepoint >= 0x1f300 && codepoint <= 0x1f64f) ||
(codepoint >= 0x1f680 && codepoint <= 0x1f6ff)) {
return 2
}
return oldCharWidthDisregardAmbiguous(codepoint)
}

View File

@ -72,7 +72,7 @@ export class Session {
}
write (data) {
this.pty.write(data)
this.pty.write(Buffer.from(data, 'utf-8'))
}
kill (signal?: string) {