update files

This commit is contained in:
nuintun
2015-11-25 09:42:21 +08:00
parent d50a32f882
commit d9d77434d6
9 changed files with 196 additions and 14 deletions

View File

@@ -5,6 +5,18 @@
'use strict';
module.exports = function (Terminal){
Terminal.prototype.isWide = 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');
};
Terminal.prototype.ch = function (cur){
return cur ? [this.curAttr, ' '] : [this.defAttr, ' '];
};