From 2934ac640801f8526838ad574c9629b467ae5956 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Sun, 9 Aug 2015 03:20:27 -0700 Subject: [PATCH] improve forceUnicode. --- lib/tput.js | 4 ++-- lib/widgets/screen.js | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/tput.js b/lib/tput.js index 5064512..5c2feaa 100644 --- a/lib/tput.js +++ b/lib/tput.js @@ -2039,8 +2039,8 @@ Tput.prototype.detectFeatures = function(info) { }; Tput.prototype.detectUnicode = function() { - if (this.options.forceUnicode) { - return true; + if (this.options.forceUnicode != null) { + return this.options.forceUnicode; } var LANG = process.env.LANG diff --git a/lib/widgets/screen.js b/lib/widgets/screen.js index 0370e60..20f8db1 100644 --- a/lib/widgets/screen.js +++ b/lib/widgets/screen.js @@ -63,9 +63,9 @@ function Screen(options) { this.program.useBuffer = true; this.program.zero = true; this.program.options.resizeTimeout = options.resizeTimeout; - if (options.forceUnicode) { - this.program.tput.features.unicode = true; - this.program.tput.unicode = true; + if (options.forceUnicode != null) { + this.program.tput.features.unicode = options.forceUnicode; + this.program.tput.unicode = options.forceUnicode; } }