? toggles the help again

This commit is contained in:
Cade Scroggins 2017-03-02 23:42:10 -08:00
parent 23a46b6b9d
commit 674bf7a47d

View file

@ -569,6 +569,10 @@
});
}
_clearInput() {
this._inputEl.value = '';
}
_handleKeypress(event) {
const newChar = String.fromCharCode(event.which);
const isEnterKey = event.which !== 13;
@ -613,7 +617,8 @@
if (event) event.preventDefault();
const query = this._inputEl.value.trim();
if (!query) {
if (!query || query === '?') {
this._clearInput();
this._help.toggle();
} else {
this._history.addItem(query);