summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorToon Nolten <toon.nolten@student.kuleuven.be>2018-08-21 12:24:00 +0200
committerToon Nolten <toon.nolten@student.kuleuven.be>2018-08-21 12:24:00 +0200
commit37d39a99185b2eb43c2c9a807a1c4ed4477ebac5 (patch)
tree001edbd63c87ab51302602178bbca76ac61843a6
parenta78adddd9bc5cb919f0d903216415522fac8c19a (diff)
downloadranger-37d39a99185b2eb43c2c9a807a1c4ed4477ebac5.tar.gz
Switch if/else branches to minimize negation
-rw-r--r--ranger/core/actions.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/ranger/core/actions.py b/ranger/core/actions.py
index e645e2f8..087758c5 100644
--- a/ranger/core/actions.py
+++ b/ranger/core/actions.py
@@ -489,10 +489,10 @@ class Actions(  # pylint: disable=too-many-instance-attributes,too-many-public-m
             if narg is not None:
                 mode = narg
             tfile = self.thisfile
-            if not kw.get('selection', True):
-                selection = [tfile]
-            else:
+            if kw.get('selection', True):
                 selection = self.thistab.get_selection()
+            else:
+                selection = [tfile]
             if tfile.is_directory:
                 self.thistab.enter_dir(tfile)
             elif selection: