From 0630dec1eb40b86a8e8d6ccec16f017118645c54 Mon Sep 17 00:00:00 2001 From: drew Date: Fri, 27 Oct 2023 23:31:38 -0500 Subject: [PATCH] Reordered conditions to fix %F macro substituting active object from previous tab --- ranger/core/actions.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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: