workspace: Allow disabling tab cycles when using keyboard navigation (#51253)
Add a `wrap_around` field, defaulting to `true`, to both `pane::ActivatePreviousItem` and `pane::ActivateNextItem` actions to optionally disable wrapping when cycling past the first or last tab. Release Notes: - Added a `wrap_around` option to both `pane::ActivatePreviousItem` and `pane::ActivateNextItem` actions to optionally disable wrapping when cycling past the first or last tab. --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: dino <dinojoaocosta@gmail.com>
This commit is contained in:
1 parent
f8e871c7b0
commit
18cf2ce256
6 files changed
+122
-24
No files matched your search
@@ -1660,9 +1660,13 @@ fn generate_commands(_: &App) -> Vec<VimCommand> {
|
||||
action.range.replace(range.clone());
|
||||
Some(Box::new(action))
|
||||
}),
|
||||
VimCommand::new(("bn", "ext"), workspace::ActivateNextItem).count(),
|
||||
VimCommand::new(("bN", "ext"), workspace::ActivatePreviousItem).count(),
|
||||
VimCommand::new(("bp", "revious"), workspace::ActivatePreviousItem).count(),
|
||||
VimCommand::new(("bn", "ext"), workspace::ActivateNextItem::default()).count(),
|
||||
VimCommand::new(("bN", "ext"), workspace::ActivatePreviousItem::default()).count(),
|
||||
VimCommand::new(
|
||||
("bp", "revious"),
|
||||
workspace::ActivatePreviousItem::default(),
|
||||
)
|
||||
.count(),
|
||||
VimCommand::new(("bf", "irst"), workspace::ActivateItem(0)),
|
||||
VimCommand::new(("br", "ewind"), workspace::ActivateItem(0)),
|
||||
VimCommand::new(("bl", "ast"), workspace::ActivateLastItem),
|
||||
@@ -1670,9 +1674,13 @@ fn generate_commands(_: &App) -> Vec<VimCommand> {
|
||||
VimCommand::str(("ls", ""), "tab_switcher::ToggleAll"),
|
||||
VimCommand::new(("new", ""), workspace::NewFileSplitHorizontal),
|
||||
VimCommand::new(("vne", "w"), workspace::NewFileSplitVertical),
|
||||
VimCommand::new(("tabn", "ext"), workspace::ActivateNextItem).count(),
|
||||
VimCommand::new(("tabp", "revious"), workspace::ActivatePreviousItem).count(),
|
||||
VimCommand::new(("tabN", "ext"), workspace::ActivatePreviousItem).count(),
|
||||
VimCommand::new(("tabn", "ext"), workspace::ActivateNextItem::default()).count(),
|
||||
VimCommand::new(
|
||||
("tabp", "revious"),
|
||||
workspace::ActivatePreviousItem::default(),
|
||||
)
|
||||
.count(),
|
||||
VimCommand::new(("tabN", "ext"), workspace::ActivatePreviousItem::default()).count(),
|
||||
VimCommand::new(
|
||||
("tabc", "lose"),
|
||||
workspace::CloseActiveItem {
|
||||
|
||||
Reference in new issue
Block a user