* Fix key press event for EditTextView

* Fix MCI draw issue for TextView
* Missing bbs.js MCI init
This commit is contained in:
Bryan Ashby 2016-08-10 23:35:17 -06:00
parent 30ba609fb4
commit 383b3b449d
3 changed files with 19 additions and 13 deletions

View file

@ -119,14 +119,17 @@ function TextView(options) {
}
}
this.client.term.write(padStr(
textToDraw,
this.dimens.width + 1,
this.fillChar,
this.justify,
this.hasFocus ? this.getFocusSGR() : this.getSGR(),
this.getStyleSGR(1) || this.getSGR()
), false);
this.client.term.write(
padStr(
textToDraw,
this.dimens.width + 1,
this.fillChar,
this.justify,
this.hasFocus ? this.getFocusSGR() : this.getSGR(),
this.getStyleSGR(1) || this.getSGR()
),
false // no converting CRLF needed
);
};
@ -184,7 +187,7 @@ TextView.prototype.setText = function(text, redraw) {
var widthDelta = 0;
if(this.text && this.text !== text) {
widthDelta = Math.abs(this.text.length - text.length);
widthDelta = Math.abs(renderStringLength(this.text) - renderStringLength(text));
}
this.text = text;
@ -198,7 +201,7 @@ TextView.prototype.setText = function(text, redraw) {
this.text = stylizeString(this.text, this.hasFocus ? this.focusTextStyle : this.textStyle);
if(this.autoScale.width) {
this.dimens.width = this.text.length + widthDelta;
this.dimens.width = renderStringLength(this.text) + widthDelta;
}
if(redraw) {