forked from tools/josh
Resolve #6
This commit is contained in:
parent
45627727fe
commit
a182f9b9d1
|
@ -113,6 +113,12 @@ class Terminal {
|
|||
this._inputHistory.clear();
|
||||
}
|
||||
|
||||
ignoreInput() {
|
||||
this.outputText += `${this.prefixText}${this.inputText}\n`;
|
||||
this.prefixText = this.generatePrefix();
|
||||
this.inputText = "";
|
||||
}
|
||||
|
||||
processInput(input) {
|
||||
this.inputText = "";
|
||||
|
||||
|
@ -155,6 +161,12 @@ class Terminal {
|
|||
this.inputText = this._inputHistory.nextEntry();
|
||||
window.setTimeout(() => moveCaretToEndOf(this._input), 0);
|
||||
break;
|
||||
case "c":
|
||||
if (e.ctrlKey) {
|
||||
this.ignoreInput();
|
||||
e.preventDefault();
|
||||
}
|
||||
break;
|
||||
case "l":
|
||||
if (e.ctrlKey) {
|
||||
this.clear();
|
||||
|
|
Loading…
Reference in New Issue