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

ClearScreen function corrected #146

Closed
wants to merge 1 commit into from

Conversation

shadowshot-x
Copy link

I noticed that we when performed ClearScreen operation on the ishell, sometimes old values from the previous screen were still displayed. This was because in the package github.com/abiosoft/readline, writer.Write([]byte("\033[H")) was used to clear the screen. However, we can simply do writer.Write([]byte("\033[H\033[2J")) to deal with this. It successfully clears the whole screen.

I also eliminated the need for external reference to readline package. We can use the io.Writer object of ishell directly to clear the screen.

I am attaching a screenshot for reference. The "ed ?" at the end of the first line should not be there in case of clearScreen as this was pasted from the previous screen.

#130

Screenshot from 2021-09-08 00-00-44

@shadowshot-x
Copy link
Author

Unmaintained repo, so closing

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.

1 participant