From 70c03a7f0bf51ba0e463fba96b43e3134728ecf3 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Wed, 15 Apr 2015 21:49:28 -0700 Subject: [PATCH] minor. --- lib/widget.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/widget.js b/lib/widget.js index ad409b7..4786326 100644 --- a/lib/widget.js +++ b/lib/widget.js @@ -1204,6 +1204,7 @@ Screen.prototype.draw = function(start, end) { // If this is a surrogate pair double-width char, we can ignore it // because parseContent already counted it as length=2. point = line[x][1].codePointAt(0); + // if (line[x][1].length === 2) { if (point <= 0xffff) { cwid = east_asian_width.char_width(point); if (cwid === 2) { @@ -2664,7 +2665,7 @@ main: // NOTE: Happens at 54 cols with all chars enabled in test. // Check to see if surrogates got split on end and beginning of 2 lines. if (/[\ud800-\udbff]$/.exec(out[i]) - && /^[\udc00-\udfff]/.exec(out[i + 1])) { + && /^[\udc00-\udfff]/.exec(out[i + 1])) { out[i] = out[i] + out[i + 1][0]; out[i + 1] = out[i + 1].substring(1) + ' '; } @@ -8667,7 +8668,8 @@ function findFile(start, target) { return (function read(dir) { var files, file, stat, out; - if (dir === '/dev' || dir === '/sys' || dir === '/proc') { + if (dir === '/dev' || dir === '/sys' + || dir === '/proc' || dir === '/net') { return null; }