From 88777c67238e0bc5a7746946839675fb897aa236 Mon Sep 17 00:00:00 2001 From: Bryan Ashby Date: Sun, 3 Sep 2017 13:15:15 -0600 Subject: [PATCH] Fix term width/height in ansiPrep() --- core/multi_line_edit_text_view.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/core/multi_line_edit_text_view.js b/core/multi_line_edit_text_view.js index b088a524..883dac80 100644 --- a/core/multi_line_edit_text_view.js +++ b/core/multi_line_edit_text_view.js @@ -554,8 +554,14 @@ function MultiLineEditTextView(options) { text = strUtil.splitTextAtTerms(text); let index = 0; - let wrapped; + // let wrapped; + text.forEach(line => { + self.setTextLines( [ line ], index, true); // true=termWithEol + index += 1; + }); + + /* text.forEach(line => { if(strUtil.isAnsiLine(line)) { self.setTextLines( [ line ], index, true); // true=termWithEol @@ -571,6 +577,7 @@ function MultiLineEditTextView(options) { index += wrapped.length; } }); + */ self.cursorStartOfDocument(); @@ -586,8 +593,8 @@ function MultiLineEditTextView(options) { ansiPrep( ansi, { - termWidth : this.client.termWidth, - termHeight : this.client.termHeight, + termWidth : this.client.term.termWidth, + termHeight : this.client.term.termHeight, cols : this.dimens.width, rows : 'auto', startCol : this.position.col,