diff --git a/ranger/core/actions.py b/ranger/core/actions.py index e1fd2afe6..7cd2542f9 100644 --- a/ranger/core/actions.py +++ b/ranger/core/actions.py @@ -346,11 +346,11 @@ def get_macros(self): for tabname in self.fm.tabs: if not first_tab: first_tab = tabname + if self.fm.current_tab == tabname: + found_current_tab = True if found_current_tab: next_tab = self.fm.tabs[tabname] break - if self.fm.current_tab == tabname: - found_current_tab = True if found_current_tab and next_tab is None: next_tab = self.fm.tabs[first_tab] try: