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: ""
      }
    }
    ...
  }
}
This commit is contained in:
Robert Mooney 2016-07-25 01:20:22 -07:00
parent e080b5dcfa
commit 9ab4adc05f
1 changed files with 3 additions and 2 deletions

View File

@ -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);
}