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

Commit 5a4bc6e

Browse files
committed
Toggle to last tab
1 parent 8f149b5 commit 5a4bc6e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/views/1_ApplicationComponent.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,11 @@ export class ApplicationComponent extends React.Component<{}, State> {
107107
}
108108

109109
if (event.metaKey && event.keyCode >= KeyCode.One && event.keyCode <= KeyCode.Nine) {
110-
const newTabIndex = parseInt(event.key, 10) - 1;
110+
let newTabIndex = parseInt(event.key, 10) - 1;
111+
112+
if (newTabIndex === 8) {
113+
newTabIndex = this.tabs.length - 1;
114+
}
111115

112116
if (this.tabs.length > newTabIndex) {
113117
this.activeTabIndex = newTabIndex;

0 commit comments

Comments
 (0)