Skip to content
This repository was archived by the owner on May 21, 2019. It is now read-only.

Commit

Permalink
Remove 'Close Pane' Shortcut. Change bindings for panes. Fixes #1056.
Browse files Browse the repository at this point in the history
  • Loading branch information
vlad-shatskyi committed May 27, 2017
1 parent 1f3638f commit 5d1e980
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 31 deletions.
1 change: 0 additions & 1 deletion src/Enums.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ export enum KeyboardAction {
// pane commands
panePrevious,
paneNext,
paneClose,
// edit/clipboard commands
clipboardCopy,
clipboardCut,
Expand Down
11 changes: 0 additions & 11 deletions src/views/1_ApplicationComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -150,17 +150,6 @@ export class ApplicationComponent extends React.Component<{}, ApplicationState>
return;
}

// Close focused pane
if (isKeybindingForEvent(event, KeyboardAction.paneClose) && jobFormComponent) {
this.closeFocusedPane();

this.forceUpdate();

event.stopPropagation();
event.preventDefault();
return;
}

// Change focussed tab
if (isKeybindingForEvent(event, KeyboardAction.tabFocus)) {
const position = parseInt(event.key, 10);
Expand Down
13 changes: 2 additions & 11 deletions src/views/keyevents/Keybindings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,6 @@ export const KeybindingsForActions: KeybindingType[] = [
return (e.ctrlKey && e.keyCode === KeyCode.N) || (e.keyCode === KeyCode.Down);
},
},
// pane command
{
action: KeyboardAction.paneClose,
keybinding: (e: KeyboardEvent) => isMeta(e) && e.keyCode === KeyCode.D,
},
// tab commands
{
action: KeyboardAction.tabFocus,
Expand Down Expand Up @@ -132,15 +127,11 @@ export const KeybindingsForMenu: KeybindingMenuType[] = [
},
{
action: KeyboardAction.panePrevious,
accelerator: `${CmdOrCtrl}+K`,
accelerator: `Alt+[`,
},
{
action: KeyboardAction.paneNext,
accelerator: `${CmdOrCtrl}+J`,
},
{
action: KeyboardAction.paneClose,
accelerator: `${CmdOrCtrl}+P`,
accelerator: `Alt+]`,
},
// edit/clipboard commands
{
Expand Down
8 changes: 0 additions & 8 deletions src/views/menu/Menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,14 +197,6 @@ export function buildMenuTemplate(
{
type: "separator",
},
{
label: "Close",
accelerator: getAcceleratorForAction(KeyboardAction.paneClose),
click: () => {
application.closeFocusedPane();
application.forceUpdate();
},
},
],
},
{
Expand Down

0 comments on commit 5d1e980

Please sign in to comment.