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.
As #1182 suggests, Micro currently lacks horizontal scrolling. This is my first approach to implementing it, but I’d like some feedback:
Is there any reliable keybinding (perhaps modekey+scroll) that we could use by default? As mentioned here, we could implement this without a default keybind, but I think it would be neat to have one.
Does this justify a new option, or could we unify it with
scrollspeed?From what I’ve seen, editors allow horizontal scrolling when there is a line longer than the buffer’s width, but they also include a margin.
For example, even if the longest line is shorter than
bufwidth - margin,scrolling is still possible. Similarly, there is often a margin for how far we can scroll past the end of the longest line.Should we have such margins? (In my current implementation, I called this OFFSET.)
Similar to
scrollmargin, ideally, Micro could have ahorizontalscrollmargin? i.e. when typing continuously, the cursor would always stay at least n cells away from the right edge, preventing it from touching the border. If so it could be the value used for the margin of question 3.Feedback on the actual implementation is also appreciated.
Currently, there’s a bug when deleting characters within the longest line.
It happens because of this.
Example: Create a line longer than
bufWidth, place your cursor at the last character, and start deleting. Shouldn’t the view shift to the left automatically as the line becomes shorter?