Skip to content

Commit

Permalink
Merge pull request #503 from AnthonyHarwood/bugfix/TextView_clearText
Browse files Browse the repository at this point in the history
Added code to clear the text
  • Loading branch information
NuSkooler authored Sep 22, 2023
2 parents 19ee4b0 + f719499 commit fc107f1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/text_view.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,10 @@ TextView.prototype.setText = function (text, redraw) {
};

TextView.prototype.clearText = function () {
if (this.text) {
this.setText(this.fillChar.repeat(this.text.length));
}

this.setText('');
};

Expand Down

0 comments on commit fc107f1

Please sign in to comment.