about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2009-07-06 17:54:05 +0200
committerhut <hut@lavabit.com>2009-07-06 17:54:05 +0200
commit8be178ebc3fa863e543e3df3f85ca76b20ce4017 (patch)
tree52d33e6afb8a1baf18e30d2ee32f73c35ba62562
parent3e69b03dc185e85e9c02cc360bc9cde7929be67d (diff)
downloadranger-8be178ebc3fa863e543e3df3f85ca76b20ce4017.tar.gz
fixed E key
-rw-r--r--code/keys.rb7
-rw-r--r--data/apps.rb4
2 files changed, 6 insertions, 5 deletions
diff --git a/code/keys.rb b/code/keys.rb
index 21a6335e..ce23e8a9 100644
--- a/code/keys.rb
+++ b/code/keys.rb
@@ -367,11 +367,8 @@ module Fm
 			fork do exec 'x-terminal-emulator' end
 
 		when 'E'
-			cf = currentfile.path
-			unless cf.nil? or enter_dir_safely(cf)
-				closei
-				system VI % cf
-				starti
+			externally do
+				Action.run(RunContext.new(getfiles, nil, nil, 'editor'))
 			end
 
 		when /^[ri](\d*)([adetw]*)[ri]$/
diff --git a/data/apps.rb b/data/apps.rb
index 921306b1..019a9848 100644
--- a/data/apps.rb
+++ b/data/apps.rb
@@ -132,5 +132,9 @@ module Application
 	def rake(files)
 		"rake"
 	end
+
+	## set the default editor for when pressing E
+	alias editor vi
+
 end