Multi-line command history#108
Merged
breakintoprogram merged 2 commits intobreakintoprogram:mainfrom Nov 10, 2023
Merged
Conversation
# Conflicts: # main.c
up/down works within a line if you are at the start of a line and press up, it will go to the previous history item if there is one, otherwise do nothing if you are somewhere along a line and press up it will either go up a line within the current string or if you’re already at the top line of that string go to the beginning if you are at the end of a line and press down it will go to the next history item if there is one, otherwise do nothing if you are somewhere along a line and press down it will either go down a line within the current string, or if you’re already on the bottom line go to the end you’re always left at the end of a line when moving position in history - this means that you’ll usually need to press up twice to go to a previous entry
Owner
|
Brilliant! I was going to get around to doing that at some point. Will merge later. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds multi-line command history to the MOS line editor, allowing the user to step thru up to their last 16 commands, rather than just the previous command.
Multi-line history is accessed via the up/down arrow keys. When at the beginning of a line, up will replace the current buffer with the previous history entry. When at the end of a line, down goes to next entry. When editing a line that is spread across multiple rows up/down will move between rows. If pressing up or down and not at the beginning/end of a command and the cursor cannot go up/down a row it will go to beginning/end of line.
First iteration of this was by @HeathenUK