Permalink
Browse files

allow user to configure direction

  • Loading branch information...
1 parent a609a68 commit 9ed26104443f92873b0b97786e69c6ac801455e4 @robhurring committed Feb 10, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 toggleview.py
View
@@ -1,6 +1,6 @@
import sublime, sublime_plugin
class ToggleViewCommand(sublime_plugin.WindowCommand):
- def run(self):
- group_idx = (self.window.active_group() + 1) % self.window.num_groups()
+ def run(self, direction = 'next'):
+ group_idx = (self.window.active_group() + (1 if direction == 'next' else -1)) % self.window.num_groups()
self.window.focus_group(group_idx)

0 comments on commit 9ed2610

Please sign in to comment.