-
Notifications
You must be signed in to change notification settings - Fork 105
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
Switching buffers in the standard ctrl-tab way #443
Open
onelivesleft
wants to merge
13
commits into
focus-editor:main
Choose a base branch
from
onelivesleft:switch-buffer
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
This is usable as is, but needs a bit of polish on close_current_buffer when the buffer is modified, which I'm working on now |
close_current_buffer polishing done. |
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.
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