Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

History limit removes the newest command, not the oldest #34

Open
RReverser opened this issue Oct 9, 2020 · 0 comments · May be fixed by #32
Open

History limit removes the newest command, not the oldest #34

RReverser opened this issue Oct 9, 2020 · 0 comments · May be fixed by #32

Comments

@RReverser
Copy link

This:

if (this.entries.length > this.size) {
this.entries.pop(0);
}

should've been using .shift(). Instead, current behaviour keeps pushing one item into the history and immediately popping it back, so that once limit is reached, no history items are stored.

RReverser added a commit to RReverser/local-echo that referenced this issue Oct 9, 2020
@RReverser RReverser linked a pull request Oct 9, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant