diff options
| author | Stephen Blott | 2016-02-20 16:40:30 +0000 |
|---|---|---|
| committer | Stephen Blott | 2016-02-20 16:40:30 +0000 |
| commit | eaafbbeeab7181ae1d3da3aa9495f98b593798f9 (patch) | |
| tree | a6d5bcd946cd51845ef6761cd235ee7377917691 /background_scripts/commands.coffee | |
| parent | 4244dc029540e941b8ab999365b9851dfdf0f32a (diff) | |
| download | vimium-eaafbbeeab7181ae1d3da3aa9495f98b593798f9.tar.bz2 | |
Fix `<count>removeTab`.
There's a nasty little bug in `removeTab` when you remove more tabs than
there are in the window (and there is a second window):
- all of the tabs in the currently-focused window are removed
- then, later (so, time passes), when you change tab in the other
window, we begin removing tabs again!
The source of the bug is our reliance on
`chrome.tabs.onSelectionChanged`, which doesn't first when removing the
last tab in a window (and there is another window).
Regardless, the previous semantics of `<count>removeTab` was
questionable. It was preactically impossible to predict which tabs
would removed. This picks the current tab, then those to the right of
the current tab, then those to the left.
Diffstat (limited to 'background_scripts/commands.coffee')
| -rw-r--r-- | background_scripts/commands.coffee | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/background_scripts/commands.coffee b/background_scripts/commands.coffee index 01eecd81..fbecc8f0 100644 --- a/background_scripts/commands.coffee +++ b/background_scripts/commands.coffee @@ -339,7 +339,7 @@ commandDescriptions = createTab: ["Create new tab", { background: true, repeatLimit: 20 }] duplicateTab: ["Duplicate current tab", { background: true, repeatLimit: 20 }] - removeTab: ["Close current tab", { background: true, repeatLimit: + removeTab: ["Close current tab", { background: true, passCountToFunction: true, repeatLimit: # Require confirmation to remove more tabs than we can restore. (if chrome.session then chrome.session.MAX_SESSION_RESULTS else 25) }] restoreTab: ["Restore closed tab", { background: true, repeatLimit: 20 }] |
