-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Implemented new actions FirstTab
, LastTab
, FirstSplit
and LastSplit
#3403
Conversation
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. |
1af6237
to
2db2545
Compare
…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
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.
Looks OK to me too 👍, but I have to be honest that I didn't test it so far.
I did. :) |
Thanks for your time and the reviews guys. 👍 |
This PR changes the default behavior of
NextTab
,PreviousTab
,NextSplit
,PreviousSplit
to not walk in circles anymore but instead splits those actions up into more atomic actions.So e.g.
NextTab
just selects the next tab but doesn't switch to the first tab in case you run the action on the last tab. A new actionFirstTab
has 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: