diff options
author | Florrie <towerofnix@gmail.com> | 2019-10-15 18:18:26 -0300 |
---|---|---|
committer | Florrie <towerofnix@gmail.com> | 2019-10-15 18:18:42 -0300 |
commit | 5c2e12b7f8cdc48e1ddb41710e60144f5c778cda (patch) | |
tree | 5a24c4d4c69e5d33230a114f0e969e76699fd3c3 | |
parent | 0f1197138e3aae2d9cc25f3f1d3c6c3d7a235422 (diff) |
Make next/previous tab controls wrap around
-rw-r--r-- | ui.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ui.js b/ui.js index 368c8ea..a7ad672 100644 --- a/ui.js +++ b/ui.js @@ -3271,11 +3271,17 @@ class Tabber extends FocusElement { nextTab() { this.currentElementIndex++ + if (this.currentElementIndex >= this.tabberElements.length) { + this.currentElementIndex = 0 + } this.updateVisibleElement() } previousTab() { this.currentElementIndex-- + if (this.currentElementIndex < 0) { + this.currentElementIndex = this.tabberElements.length - 1 + } this.updateVisibleElement() } |