Skip to content

Commit

Permalink
Exclude pinned tabs when closing items (#19593)
Browse files Browse the repository at this point in the history
Closing multiple items will no longer closed pinned tabs.

Closes #19560

Release Notes:

- Fixed close actions closing pinned tabs.
  • Loading branch information
axelcarl authored Nov 7, 2024
1 parent b33ae88 commit 4f62ebe
Show file tree
Hide file tree
Showing 5 changed files with 220 additions and 47 deletions.
6 changes: 3 additions & 3 deletions assets/keymaps/default-linux.json
Original file line number Diff line number Diff line change
Expand Up @@ -251,10 +251,10 @@
"ctrl-shift-pagedown": "pane::SwapItemRight",
"ctrl-w": "pane::CloseActiveItem",
"ctrl-f4": "pane::CloseActiveItem",
"alt-ctrl-t": "pane::CloseInactiveItems",
"alt-ctrl-t": ["pane::CloseInactiveItems", { "close_pinned": false }],
"alt-ctrl-shift-w": "workspace::CloseInactiveTabsAndPanes",
"ctrl-k u": "pane::CloseCleanItems",
"ctrl-k w": "pane::CloseAllItems",
"ctrl-k u": ["pane::CloseCleanItems", { "close_pinned": false }],
"ctrl-k w": ["pane::CloseAllItems", { "close_pinned": false }],
"ctrl-shift-f": "project_search::ToggleFocus",
"ctrl-alt-g": "search::SelectNextMatch",
"ctrl-alt-shift-g": "search::SelectPrevMatch",
Expand Down
6 changes: 3 additions & 3 deletions assets/keymaps/default-macos.json
Original file line number Diff line number Diff line change
Expand Up @@ -291,10 +291,10 @@
"ctrl-shift-pageup": "pane::SwapItemLeft",
"ctrl-shift-pagedown": "pane::SwapItemRight",
"cmd-w": "pane::CloseActiveItem",
"alt-cmd-t": "pane::CloseInactiveItems",
"alt-cmd-t": ["pane::CloseInactiveItems", { "close_pinned": false }],
"ctrl-alt-cmd-w": "workspace::CloseInactiveTabsAndPanes",
"cmd-k u": "pane::CloseCleanItems",
"cmd-k cmd-w": "pane::CloseAllItems",
"cmd-k u": ["pane::CloseCleanItems", { "close_pinned": false }],
"cmd-k cmd-w": ["pane::CloseAllItems", { "close_pinned": false }],
"cmd-f": "project_search::ToggleFocus",
"cmd-g": "search::SelectNextMatch",
"cmd-shift-g": "search::SelectPrevMatch",
Expand Down
2 changes: 2 additions & 0 deletions crates/vim/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -628,10 +628,12 @@ fn generate_commands(_: &AppContext) -> Vec<VimCommand> {
("tabo", "nly"),
workspace::CloseInactiveItems {
save_intent: Some(SaveIntent::Close),
close_pinned: false,
},
)
.bang(workspace::CloseInactiveItems {
save_intent: Some(SaveIntent::Skip),
close_pinned: false,
}),
VimCommand::new(
("on", "ly"),
Expand Down
Loading

0 comments on commit 4f62ebe

Please sign in to comment.