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

No cursor in terminal when exiting #90

Closed
Lynesth opened this issue May 2, 2018 · 4 comments
Closed

No cursor in terminal when exiting #90

Lynesth opened this issue May 2, 2018 · 4 comments
Milestone

Comments

@Lynesth
Copy link
Collaborator

Lynesth commented May 2, 2018

So I made #89 but it doesn't work as intended.

I think it's the restoreOriginalConfiguration which doesn't work in my case.
Adding enableCursor and enableEchoBack after the stty exec call in restoreOriginalConfiguration (inside php-school/terminal/UnixTerminal.php) makes it work.

(I need to add both, because just adding enableCursor gives the cursor back but removes the echo !!!)

Not sure if real issue or just specific case.

@AydinHassan
Copy link
Member

Yeah I've noticed this also - I'm going to take a closer look, because the restore should work. It just takes a snapshot of the current config and applies that back, we must be doing something weird somewhere.

@Lynesth
Copy link
Collaborator Author

Lynesth commented May 2, 2018

I checked directly in the terminal, echoing \033[25l or executing tput civis doesn't change the output of stty -g.

@AydinHassan
Copy link
Member

AydinHassan commented May 2, 2018

ah yeah, so we definitely need to enable the cursor in tearDownTerminal but echo back should be handled by the stty restore. Maybe something weird is going on with the exec call. Looks like we are using the return value which is only the last line of output.

@Lynesth
Copy link
Collaborator Author

Lynesth commented May 2, 2018

The echo back is correctly handled yes, nevermind that I don't know what went wrong.
Reenabling the cursor in restoreOriginalConfiguration does the trick (not in tearDownTerminal or it wouldn't be restored on terminal __destruct).

@AydinHassan AydinHassan added this to the 3.0 milestone May 2, 2018
AydinHassan added a commit that referenced this issue May 7, 2018
Enable cursor when exiting terminal - closes #90
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

No branches or pull requests

2 participants