summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-05-07 10:15:49 +0200
committerhut <hut@lavabit.com>2010-05-10 21:03:40 +0200
commit2a4a9fd3ddab885de474e1cc9c87b38591443d72 (patch)
tree020f694842ad23efed89d62100bb5ce842c71030 /ranger
parent1dbc2fcedd9733c50d5a276201bd3d20b05f924e (diff)
downloadranger-2a4a9fd3ddab885de474e1cc9c87b38591443d72.tar.gz
defaults.commands: edit current file with ":edit"
Diffstat (limited to 'ranger')
-rw-r--r--ranger/defaults/commands.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/ranger/defaults/commands.py b/ranger/defaults/commands.py
index 278fb8d5..8728f9be 100644
--- a/ranger/defaults/commands.py
+++ b/ranger/defaults/commands.py
@@ -367,7 +367,10 @@ class edit(Command):
 
 	def execute(self):
 		line = parse(self.line)
-		self.fm.edit_file(line.rest(1))
+		if not line.chunk(1):
+			self.fm.edit_file(self.fm.env.cf.path)
+		else:
+			self.fm.edit_file(line.rest(1))
 
 	def tab(self):
 		return self._tab_directory_content()