diff options
| author | Stephen Blott | 2015-09-17 10:23:58 +0100 | 
|---|---|---|
| committer | Stephen Blott | 2015-09-17 10:24:01 +0100 | 
| commit | 37ba00af0e89641d0c54c19968c8986719eecde1 (patch) | |
| tree | c01562510b74a366655c2136a0a8ecf08f1ba3b2 /background_scripts/main.coffee | |
| parent | 44724013cf52ddbde999b3570175ef6e223f6b98 (diff) | |
| download | vimium-37ba00af0e89641d0c54c19968c8986719eecde1.tar.bz2 | |
Fix regression in #1828.
In #1828, we (I) broke the fact that `gt` and `gT` should be able to
wrap around at the ends (so, for example, `gt` on the right-most tab
should take you to the first).
Diffstat (limited to 'background_scripts/main.coffee')
| -rw-r--r-- | background_scripts/main.coffee | 4 | 
1 files changed, 2 insertions, 2 deletions
| diff --git a/background_scripts/main.coffee b/background_scripts/main.coffee index 511d24ac..df841028 100644 --- a/background_scripts/main.coffee +++ b/background_scripts/main.coffee @@ -349,9 +349,9 @@ selectTab = (direction, count = 1) ->        toSelect =          switch direction            when "next" -            Math.min tabs.length - 1, currentTab.index + count +            (currentTab.index + count) % tabs.length            when "previous" -            Math.max 0, currentTab.index - count +            (currentTab.index - count + count * tabs.length) % tabs.length            when "first"              Math.min tabs.length - 1, count - 1            when "last" | 
