From 9ab4adc05f8f676172fef8ff056bbbe46ac1f1a6 Mon Sep 17 00:00:00 2001 From: Robert Mooney Date: Mon, 25 Jul 2016 01:20:22 -0700 Subject: [PATCH] Handle empty text masks. This allows themes to prevent text from being sent during password entry. To enable, edit theme.hjson and set $.customization.defaults .general.passwordChar to "". e.g., { ... customization: { defaults: { general: { passwordChar: "" } } ... } } --- core/edit_text_view.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/edit_text_view.js b/core/edit_text_view.js index efe2c812..424041ae 100644 --- a/core/edit_text_view.js +++ b/core/edit_text_view.js @@ -68,8 +68,9 @@ EditTextView.prototype.onKeyPress = function(ch, key) { } else { this.cursorPos.col += 1; - if(this.textMaskChar) { - this.client.term.write(this.textMaskChar); + if(_.isString(this.textMaskChar)) { + if(this.textMaskChar.length > 0) + this.client.term.write(this.textMaskChar); } else { this.client.term.write(ch); }