Skip to content

Commit

Permalink
fixes #1131
Browse files Browse the repository at this point in the history
  • Loading branch information
dotcypress committed Dec 13, 2016
1 parent 8939040 commit d03668a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/hterm.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ hterm.TextAttributes.splitWidecharString = function (str) {
return ctx;
}
if (ctx.acc) {
context.items.push({str: ctx.acc});
ctx.items.push({str: ctx.acc});
ctx.acc = '';
}
context.items.push({str: rune, wcNode: true});
ctx.items.push({str: rune, wcNode: true});
return ctx;
}, {items: [], acc: ''});
if (context.acc) {
Expand Down Expand Up @@ -154,7 +154,7 @@ hterm.Terminal.prototype.setFontSize = function (px) {
const oldCreateContainer = hterm.TextAttributes.prototype.createContainer;
hterm.TextAttributes.prototype.createContainer = function (text) {
const container = oldCreateContainer.call(this, text);
if (container.style && text.length < 2 && containsNonLatinCodepoints(text)) {
if (container.style && runes(text).length === 1 && containsNonLatinCodepoints(text)) {
container.className += ' unicode-node';
}
return container;
Expand Down

0 comments on commit d03668a

Please sign in to comment.