readline: make `ctrl + L` clear the screen

This commit is contained in:
Yuan Chuan 2013-06-15 15:48:36 +08:00 коммит произвёл Ben Noordhuis
Родитель 41fc46e52f
Коммит 18574bfaf1
1 изменённых файлов: 6 добавлений и 0 удалений

Просмотреть файл

@ -663,6 +663,12 @@ Interface.prototype._ttyWrite = function(s, key) {
this._moveCursor(+1);
break;
case 'l': // clear the whole screen
exports.cursorTo(this.output, 0, 0);
exports.clearScreenDown(this.output);
this._refreshLine();
break;
case 'n': // next history item
this._historyNext();
break;