diff options
author | toonn <toonn@toonn.io> | 2018-08-23 21:15:30 +0200 |
---|---|---|
committer | toonn <toonn@toonn.io> | 2018-08-23 21:15:30 +0200 |
commit | 8b240933ab3b6f7a460d93d2da2e7be1acab8a5f (patch) | |
tree | 7ab37644798a8864bb94462731f1f6b4096f0e35 | |
parent | b6497f5d1d7c03e121b1b68db256f551fc4ed14f (diff) | |
download | ranger-8b240933ab3b6f7a460d93d2da2e7be1acab8a5f.tar.gz |
Removed ghost of function definition
-rw-r--r-- | ranger/core/actions.py | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/ranger/core/actions.py b/ranger/core/actions.py index 1d95a9b7..800226e1 100644 --- a/ranger/core/actions.py +++ b/ranger/core/actions.py @@ -1191,59 +1191,6 @@ class Actions( # pylint: disable=too-many-instance-attributes,too-many-public-m return self.tab_open(i, path) return None - def tab_shift(self, offset=0, pos=None): - """Shift the tab left/right - - Shift the current tab to the left or right by either: - offset - changes the tab number by offset - pos - shifts the tab to the specified tab number - """ - - oldtab_index = self.current_tab - if pos is None: - assert isinstance(offset, int) - # enumerated index (1 to 9) - newtab_index = oldtab_index + offset - if newtab_index < 1: - newtab_index = 1 - if newtab_index > 9: - newtab_index = 9 - else: - assert isinstance(pos, int) - if pos < 1 or pos > 9: - return None - newtab_index = pos - # shift tabs without enumerating, preserve tab numbers when can - if newtab_index != oldtab_index: - # the other tabs shift in the opposite direction - if (newtab_index - oldtab_index) > 0: - direction = -1 - else: - direction = 1 - - def tabshiftreorder(source_index): - # shift the tabs to make source_index empty - if source_index in self.tabs: - target_index = source_index + direction - # make the target_index empty recursively - tabshiftreorder(target_index) - # shift the source to target - source_tab = self.tabs[source_index] - self.tabs[target_index] = source_tab - del self.tabs[source_index] - - # first remove the current tab from the dict - oldtab = self.tabs[oldtab_index] - del self.tabs[oldtab_index] - # make newtab_index empty by shifting - tabshiftreorder(newtab_index) - self.tabs[newtab_index] = oldtab - self.current_tab = newtab_index - self.thistab = oldtab - self.ui.titlebar.request_redraw() - self.signal_emit('tab.layoutchange') - return None - def tab_shift(self, offset=0, to=None): # pylint: disable=invalid-name """Shift the tab left/right |