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

View file

@ -68,7 +68,8 @@ EditTextView.prototype.onKeyPress = function(ch, key) {
} else { } else {
this.cursorPos.col += 1; this.cursorPos.col += 1;
if(this.textMaskChar) { if(_.isString(this.textMaskChar)) {
if(this.textMaskChar.length > 0)
this.client.term.write(this.textMaskChar); this.client.term.write(this.textMaskChar);
} else { } else {
this.client.term.write(ch); this.client.term.write(ch);