-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Goto buffer #4756
Closed
Closed
Goto buffer #4756
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
f3bfb8b
Implemented "goto-buffer" command
6f54f7d
Merge branch 'master' into goto-buffer
c156b42
Inlined some functions
92e49e1
Added documentation for goto-buffer command
a7c5b9f
Added shortcut for going to buffers
1357ac6
Removed abbreviations like "idx" and "curr"
4bf9e14
Now using `Iterator::nth`
fa8c7ab
Now completing the buffer names
50747e4
Now returning err on invalid indices
b474ab7
Renamed "buffer <i>" to "buffer number <n>" in doc
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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 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 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 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 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it's necessary to change the body of the old
goto_buffer
function - it has the same behavior before and after except that going to the previous buffer skips from the opposite directionThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mainly replaced the body of the function because I saw nearly identical code in both branches of the match statement. That just triggered my refactoring sense, lol.
After looking into it, using an iterator the way it is used here may be hard to understand / overkill for such a simple task.
I'm honestly not certain what you mean by this.
buffer-next
goes "to the right", andbuffer-previous
goes "to the left". Have I missed something that the original implementation does?