Skip to content

Instantly share code, notes, and snippets.

@eagletmt
Created June 17, 2011 05:34
Show Gist options
  • Save eagletmt/1030921 to your computer and use it in GitHub Desktop.
Save eagletmt/1030921 to your computer and use it in GitHub Desktop.
diff -r 23f5c4975e67 common/content/tabs.js
--- a/common/content/tabs.js Mon Jun 13 20:33:33 2011 +0200
+++ b/common/content/tabs.js Fri Jun 17 14:28:38 2011 +0900
@@ -595,7 +595,9 @@
else
return -1;
- if (position > last)
+ if (length == 1)
+ position = 0;
+ else if (position > last)
position = wrap ? position % length : last;
else if (position < 0)
position = wrap ? (position % length) + length : 0;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment