summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-11-01 14:25:58 +0100
committerhut <hut@lavabit.com>2010-11-01 14:37:22 +0100
commitdad0644f8819521c26739c185254f6edb36746ce (patch)
tree72bd22acec5f054c9eb93a269b53c3e867a02b82
parent1c683951ef9c20a835ee828ee56f3f2cc30bb437 (diff)
downloadranger-dad0644f8819521c26739c185254f6edb36746ce.tar.gz
widgets.browsercolumn: Run files with right mouse click
-rw-r--r--ranger/gui/widgets/browsercolumn.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/ranger/gui/widgets/browsercolumn.py b/ranger/gui/widgets/browsercolumn.py
index eb898e2a..5422b960 100644
--- a/ranger/gui/widgets/browsercolumn.py
+++ b/ranger/gui/widgets/browsercolumn.py
@@ -82,7 +82,11 @@ class BrowserColumn(Pager):
 				elif event.pressed(3):
 					try:
 						clicked_file = self.target.files[index]
-						self.fm.enter_dir(clicked_file.path)
+						if clicked_file.is_directory:
+							self.fm.enter_dir(clicked_file.path)
+						elif self.level == 0:
+							self.fm.env.cwd.move_to_obj(clicked_file)
+							self.fm.execute_file(clicked_file)
 					except:
 						pass