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

Send ^L when the terminal clear command is triggered on supported shells #48146

Closed
Tyriar opened this issue Apr 18, 2018 · 4 comments
Closed
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug terminal Integrated terminal issues verified Verification succeeded
Milestone

Comments

@Tyriar
Copy link
Member

Tyriar commented Apr 18, 2018

Currently we tell xterm.js to clear the viewport when the clear terminal command is triggered. This does not work for the case where a multi-line prompt is used.

@Tyriar Tyriar added bug Issue identified by VS Code Team member as probable bug terminal Integrated terminal issues labels Apr 18, 2018
@Tyriar Tyriar added this to the April 2018 milestone Apr 18, 2018
@Tyriar Tyriar self-assigned this Apr 18, 2018
@Tyriar Tyriar closed this as completed in 07acfd7 Apr 18, 2018
@Tyriar
Copy link
Member Author

Tyriar commented Apr 18, 2018

To verifier:

In bash and zsh set your $PS1 to include a \n character, then run the Terminal: Clear command and make sure your full multi-line prompt is retained.

Also check on a non-supported shell like cmd.exe that it clears as before (multiple lines are not retained).

@mjbvz mjbvz added the verified Verification succeeded label Apr 27, 2018
@EyePulp
Copy link

EyePulp commented Apr 30, 2018

Howdy; running vscode Version 1.23.0-insider on MacOS

I have { "key": "cmd+k", "command": "workbench.action.terminal.clear", "when": "terminalFocus" }, set in my keybindings.json.

cmd+k works as expected in my terminal if I'm at a prompt. However, starting a few weeks ago, if a script is running when cmd+k is pressed, I see a ^L show up, but the term window isn't cleared.

The timing seems related to this change, but I'm not sure. Advice is appreciated if this isn't a bug.
Thanks!

@Tyriar
Copy link
Member Author

Tyriar commented Apr 30, 2018

@EyePulp thanks for the report, created #48974

@EyePulp
Copy link

EyePulp commented May 1, 2018

Thanks @Tyriar

@vscodebot vscodebot bot locked and limited conversation to collaborators Jun 2, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug terminal Integrated terminal issues verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

3 participants