for (; i < width; i++) {
data = line[i][0];
ch = line[i][1];
- ch_width = line[i][2] || 1;
+ ch_width = line[i][2];
if (!ch_width)
continue;
if (ch <= ' ') {
out += ' ';
} else {
- if (ch_width==2) i++;
out += ch;
}
break;
if (0xDC00 <= code && code <= 0xDFFF)
continue;
- ch_width = wcswidth(code);
-
-
switch (this.state) {
case normal:
switch (ch) {
default:
// ' '
+ ch_width = wcswidth(code); // expensive, therefore we save the result in line buffer
+
if (ch >= ' ') {
if (this.charset && this.charset[ch]) {
ch = this.charset[ch];
return thirdLevelKey && (!ev.keyCode || ev.keyCode > 47);
}
- function isWide(ch) {
- if (ch <= '\uff00') return false;
- return (ch >= '\uff01' && ch <= '\uffbe')
- || (ch >= '\uffc2' && ch <= '\uffc7')
- || (ch >= '\uffca' && ch <= '\uffcf')
- || (ch >= '\uffd2' && ch <= '\uffd7')
- || (ch >= '\uffda' && ch <= '\uffdc')
- || (ch >= '\uffe0' && ch <= '\uffe6')
- || (ch >= '\uffe8' && ch <= '\uffee');
- }
-
function matchColor(r1, g1, b1) {
var hash = (r1 << 16) | (g1 << 8) | b1;