-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Add serial monitor command history #8674
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
Add serial monitor command history #8674
Conversation
@ArduinoBot build this please
✅ Build completed.
Please test this code using one of the following:
⬇️ http://downloads.arduino.cc/javaide/pull_requests/arduino-PR-8674-BUILD-845-linux32.tar.xz
⬇️ http://downloads.arduino.cc/javaide/pull_requests/arduino-PR-8674-BUILD-845-linux64.tar.xz
⬇️ http://downloads.arduino.cc/javaide/pull_requests/arduino-PR-8674-BUILD-845-windows.zip
⬇️ http://downloads.arduino.cc/javaide/pull_requests/arduino-PR-8674-BUILD-845-macosx.zip
⬇️ http://downloads.arduino.cc/javaide/pull_requests/arduino-PR-8674-BUILD-845-linuxarm.tar.xz
i️ The linuxarm
build is still experimental and may not be always available.
The behavior is as follows: - Pressing the UP key will select older commands. - Pressing the DOWN key will select newer commands, restoring the last unexecuted command if available. - Pressing the ESC key will reset the input field to the latest unexecuted command and reset the traversal location. Pressing ESC while the latest unexecuted command is selected will clear the input field. This fixes arduino#4891, with the difference that the proposed solution has a command history per Arduino session and this implementation has a command history per serial monitor start.
a0d8387
to
82c67b0
Compare
Rebased this PR onto master.
- Use LinkedList with ListIterator to make all methods except for `clear()` run in `O(1)` (constant runtime) instead of `O(n)` (linear runtime). - No longer store executed commands that are executed multiple times (executing {1, 1, 1, 1, 2} now only adds {1, 2} to the history).
496e6ff
to
fe75b82
Compare
Manually rebased and merged, thanks!
The behavior is as follows:
This fixes #4891, with the difference that the proposed solution has a command history per Arduino session and this implementation has a command history per serial monitor start.