Lines Matching refs:history
148 let history;
159 history = input.history;
193 if (history === undefined) {
194 history = [];
196 validateArray(history, 'history');
221 this.history = history;
455 if (this.history.length === 0 || this.history[0] !== this.line) {
458 const dupIndex = ArrayPrototypeIndexOf(this.history, this.line);
459 if (dupIndex !== -1) ArrayPrototypeSplice(this.history, dupIndex, 1);
462 ArrayPrototypeUnshift(this.history, this.line);
465 if (this.history.length > this.historySize) ArrayPrototypePop(this.history);
473 const line = this.history[0];
476 this.emit('history', this.history);
806 (!StringPrototypeStartsWith(this.history[index], search) ||
807 this.line === this.history[index])) {
813 this.line = this.history[index];
822 if (this.historyIndex < this.history.length && this.history.length) {
825 while (index < this.history.length &&
826 (!StringPrototypeStartsWith(this.history[index], search) ||
827 this.line === this.history[index])) {
830 if (index === this.history.length) {
833 this.line = this.history[index];
972 if (this.history.length === this.historyIndex) {
1051 case 'n': // next history item
1055 case 'p': // Previous history item