fix indexing history upwards to be more accurate

This commit is contained in:
2025-02-22 21:37:05 -05:00
parent 93217ac064
commit 62ba198b40

View File

@ -19,8 +19,8 @@ history.file.cursor_reset = function() {
}
history.add = function(cmd: string) {
if (this.file.inner[this.file.inner.length-1] !== cmd) {
this.file.inner.push(cmd)
if (this.file.inner[0] !== cmd) {
this.file.inner.unshift(cmd)
}
}