Don't clear prompt on clear if it already is

This commit is contained in:
Daniel Imms
2016-09-17 03:59:42 -07:00
parent 76719413f9
commit 852dac4d62
+4
View File
@@ -3058,6 +3058,10 @@ Terminal.prototype.eraseLeft = function(x, y) {
* Clears the entire buffer, making the prompt line the new first line.
*/
Terminal.prototype.clear = function() {
if (this.ybase === 0 && this.y === 0) {
// Don't clear if it's already clear
return;
}
this.ydisp = 0;
this.ybase = 0;
this.y = 0;