Make CMD + K work for all commands, even tail (#215)

This commit is contained in:
Marc Bachmann 2016-07-18 04:52:29 +02:00 committed by Guillermo Rauch
parent af945e064c
commit 112baec8d0

View file

@ -87,6 +87,13 @@ export default class Term extends Component {
clear () {
this.term.clearPreserveCursorRow();
// If cursor is still not at the top, a command is probably
// running and we'd like to delete the whole screen.
// Move cursor to top
if (this.term.getCursorRow() !== 0) {
this.term.io.writeUTF8('\x1B[0;0H\x1B[2J');
}
}
getTermDocument () {