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
Persistent Command Buffer #2047
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #2047 +/- ##
============================================
- Coverage 37.08% 37.08% -0.01%
Complexity 19376 19376
============================================
Files 1093 1093
Lines 167505 167518 +13
Branches 35464 35465 +1
============================================
Hits 62117 62117
- Misses 95460 95473 +13
Partials 9928 9928
Continue to review full report in Codecov by Sentry.
|
src/net/sourceforge/kolmafia/swingui/panel/CommandDisplayPanel.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to work.
See https://kolmafia.us/threads/persistent-command-history-control-history-size.29213/
This saves the gCLI and tabbed chat command buffers to separate GLOBAL preferences. The commands are in a list delimited by the sharp sign which some people insist on calling a hashtag. The list is loaded on start up and the command index is set to the last element so an up arrow in a new session should select the last command from the previous session.
I've lightly tested this with the gCLI but not tabbed chat.
There was a request to allow the size of the buffer to be a preference. I decided NOT to implement that because if the size changed then the CommandDisplayFrame would have to be rebuilt or mafia shutdown and restarted before the effect was noticeable. It is trivial, now or later, to change the hardcoded 20 to something else if that is what people want.