Limit input history to a 100 entries.

This commit is contained in:
Richard Lewis 2018-09-12 23:35:55 +03:00 committed by Pavel Djundik
parent d1185da9eb
commit 74edfcaa04

View file

@ -202,6 +202,11 @@ export default {
this.channel.inputHistory.splice(1, 0, text);
}
// Limit input history to a 100 entries
if (this.channel.inputHistory.length > 100) {
this.channel.inputHistory.pop();
}
if (text[0] === "/") {
const args = text.substr(1).split(" ");
const cmd = args.shift().toLowerCase();