From 5180447e87f5da53191f74f109036890f66a88d8 Mon Sep 17 00:00:00 2001 From: anthony Date: Fri, 22 Sep 2023 10:33:42 -0500 Subject: [PATCH] Added code to clear the text --- core/text_view.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/text_view.js b/core/text_view.js index 74b622ba..772621db 100644 --- a/core/text_view.js +++ b/core/text_view.js @@ -179,6 +179,10 @@ TextView.prototype.setText = function (text, redraw) { }; TextView.prototype.clearText = function () { + if (this.text) { + this.setText(' '.repeat(this.text.length)); + } + this.setText(''); };