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.
Closes #3707
This is WIP, but I figured I'd put it up to start gathering some feedback.
This PR implements buffer reordering, currently only supporting incrementing and decrementing the ordering of the current buffer.
It adds a new
document_ordering
field to theEditor
which must be kept in-sync with the actual documents in the editor (I'd be surprised if what I have currently doesn't contain any bugs that let the documents and document ordering go out-of-sync, I tried to find all the places where docs are actually added and removed) and uses the document ordering to power the way the bufferline is drawn as well as how thegoto_next_buffer
andgoto_previous_buffer
commands work.If we're okay with the general approach I'm curious if we should add ordering to the bufferline picker or expose in some other way what the actual current ordering is, since it's no longer solely based on the document ID.
buffer_reordering_720.mov