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

Terminal "clear" bug #36144

Closed
paulkunitsky opened this issue Oct 12, 2017 · 7 comments
Closed

Terminal "clear" bug #36144

paulkunitsky opened this issue Oct 12, 2017 · 7 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug terminal Integrated terminal issues upstream Issue identified as 'upstream' component related (exists outside of VS Code) windows VS Code on Windows issues
Milestone

Comments

@paulkunitsky
Copy link

paulkunitsky commented Oct 12, 2017

  • VSCode Version: 1.17.1
  • OS Version: Windows 10

Fix terminal "clear" bug.
Terminal aint cleared, but caret moves to top.

@vscodebot vscodebot bot added the terminal Integrated terminal issues label Oct 12, 2017
@mxschmitt
Copy link
Member

mxschmitt commented Oct 12, 2017

How do you try to clear the Terminal? I don't see any button which should have the ability to do this.
The trash icon is to kill the terminal, the x icon to close the terminal and the arrow up to maximize it.

@omril1
Copy link

omril1 commented Oct 12, 2017

Could you provide more information about it? Are you using a command? If so, on which terminal is that?

@coreh
Copy link

coreh commented Oct 12, 2017

How do you try to clear the Terminal? I don't see any button which should have the ability to do this.
The trash icon is to kill the terminal, the x icon to close the terminal and the arrow up to maximize it.

@maxibanki Cmd+K (Or Ctrl+K on Windows)

@mxschmitt
Copy link
Member

Can you reproduce it?
In my environment:

  • VSCode Version: Code - Insiders 1.17.0-insider (7ac1f1e, 2017-09-30T05:06:21.234Z)
  • OS Version: Windows_NT x64 6.1.7601

It works without any problems.

@paulkunitsky
Copy link
Author

paulkunitsky commented Oct 12, 2017

I'm using embedded git bash terminal and command "clear" to work with node.js. I have a habbit to clean the log, so I noticed that. I faced that problem after the latest update (1.17.1).
I did run VS code with "--no-extensions" flag. It didn't solve the problem.

screenshots
https://ibb.co/jamrvb
https://ibb.co/noaqow

@Tyriar Tyriar added bug Issue identified by VS Code Team member as probable bug upstream Issue identified as 'upstream' component related (exists outside of VS Code) windows VS Code on Windows issues labels Oct 28, 2017
@Tyriar Tyriar added this to the Backlog milestone Oct 28, 2017
@mklement0
Copy link
Contributor

There are several related issues:

  • Apparently, using shell-native cls / Clear-Host only clears the current screen (one screen's worth of output), while preserving the rest of the scrollback buffer.

  • By contrast, workbench.action.terminal.clear clears bot the current screen and the scrollback buffer. There is currently no UI element to invoke this command (though the suggestion has been made - see Integrated Terminal: add "Clear Console" button #30077), so a keyboard shortcut is required.

  • Ctrl+K should work on Windows, but apparently doesn't as of 1.18 (even though the UI suggests it should; observed on W7x64); workaround: place the default definition at the end of your keybindings.json file.

  {
    "key": "ctrl+k",
    "command": "workbench.action.terminal.clear",
    "when": "terminalFocus"
  }

@cnavarro16
Copy link

cnavarro16 commented Nov 24, 2017

Can confirm that adding the default definition for workbench.action.terminal.clear at the end of the keybindings.json file did the trick as per @mklement0's comment. This is on windows 10 running 1.18.

@vscodebot vscodebot bot locked and limited conversation to collaborators Dec 30, 2017
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 upstream Issue identified as 'upstream' component related (exists outside of VS Code) windows VS Code on Windows issues
Projects
None yet
Development

No branches or pull requests

8 participants