Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added code to clear the text #503

Merged
merged 3 commits into from
Sep 22, 2023
Merged

Added code to clear the text #503

merged 3 commits into from
Sep 22, 2023

Conversation

AnthonyHarwood
Copy link

I noticed the text in the error view was not being cleared after the error was corrected. For example, "Username is too short".

I can think of a few different ways this could have been fixed. I try to keep it simple. If you prefer a different approach to resolving this, please don't hesitate to let me know.

Thanks!

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like a great change! See below for one small comment -

@@ -179,6 +179,10 @@ TextView.prototype.setText = function (text, redraw) {
};

TextView.prototype.clearText = function () {
if (this.text) {
this.setText(' '.repeat(this.text.length));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use this.fillChar here instead of a literal space?

Copy link
Author

@AnthonyHarwood AnthonyHarwood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good suggestion. Thanks.

Copy link
Collaborator

@cognitivegears cognitivegears left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, I'll wait for @NuSkooler in case he has any concerns but thanks so much for the PR, keep 'em coming :)

Copy link
Owner

@NuSkooler NuSkooler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, I like simple! Thanks!

@NuSkooler NuSkooler merged commit fc107f1 into NuSkooler:master Sep 22, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants