Implemented new actions FirstTab, LastTab, FirstSplit and LastSplit#3403
Merged
dmaluka merged 2 commits intomicro-editor:masterfrom Sep 16, 2024
Merged
Implemented new actions FirstTab, LastTab, FirstSplit and LastSplit#3403dmaluka merged 2 commits intomicro-editor:masterfrom
FirstTab, LastTab, FirstSplit and LastSplit#3403dmaluka merged 2 commits intomicro-editor:masterfrom
Conversation
Contributor
Author
|
I have just found another bug concerning the order of the split selection. When adding a new How to reproduce:
Switching from most left split to the most right, the expected order would be 1, 3, 2 but actually is 1, 2, 3. |
dmaluka
reviewed
Sep 14, 2024
1af6237 to
2db2545
Compare
dmaluka
reviewed
Sep 15, 2024
…Split` and changed the default behavior of `NextTab`, `PreviousTab`, `NextSplit`, `PreviousSplit` to not walk in circles anymore
…t array index. When adding a new `BufPane` it is always being inserted last into `MainTab().Panes`. This leads to a confusion when using the actions `PreviousSplit`, `NextSplit` as the previous/next split may not be the expected one. How to reproduce: - Launch micro and insert char "1" - Open a new vsplit via the command `vsplit` and insert "2" - Switch back to the left split (1) by using `PreviousSplit` - Again open a new vsplit via command: `vsplit` and type char "3" - Now switch between the 3 splits using `PreviousSplit`, `NextSplit` Switching from most left split to the most right, the expected order would be 1, 3, 2 but actually is 1, 2, 3.
2db2545 to
5f83661
Compare
dmaluka
approved these changes
Sep 15, 2024
JoeKar
approved these changes
Sep 16, 2024
Member
JoeKar
left a comment
There was a problem hiding this comment.
Looks OK to me too 👍, but I have to be honest that I didn't test it so far.
Collaborator
|
I did. :) |
Contributor
Author
|
Thanks for your time and the reviews guys. 👍 |
Closed
This file contains hidden or 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
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.
This PR changes the default behavior of
NextTab,PreviousTab,NextSplit,PreviousSplitto not walk in circles anymore but instead splits those actions up into more atomic actions.So e.g.
NextTabjust selects the next tab but doesn't switch to the first tab in case you run the action on the last tab. A new actionFirstTabhas been added and can be chained to restore the original behavior.This adds a lot of flexibility to the user to create more sophisticated keybindings.
The following keybinding allows a combination of split and tab switching: