Switching buffers in the standard ctrl-tab way #443
+535
−72
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.
Allows the user to switch between recent buffers, which should be an orthogonal operation to the cursor history (current
move_to_previous_buffer
/move_to_next_buffer
use the cursor history). This organises the buffers in order of recent access, per pane (i.e left / right editor). While choosing a buffer, the filenames are drawn as tabs in the status bar.Normally editors would bind this to ctrl-tab/ctrl-shift-tab; I've left the defaults for it as ctrl-pagedown/pageup for consistency with the current keymap, but would recommend rearranging these (and moving the current
switch_between_open_files
dialog to something else). In this PR the ctrl key is hard-coded: once the user starts flipping through open buffers, we stay in this mode until the user releases ctrl.Also added
close_current_buffer
(default Alt-w)Other changes in this PR:
most_recent_buffers
to ourArray
type.Tween_Animation.speed
toTween_Animation.duration
draw_file_info
now takes aflags
parameter which governs which things to draw