about summary refs log tree commit diff stats
path: root/code/fm/keys.rb
diff options
context:
space:
mode:
Diffstat (limited to 'code/fm/keys.rb')
-rw-r--r--code/fm/keys.rb21
1 files changed, 8 insertions, 13 deletions
diff --git a/code/fm/keys.rb b/code/fm/keys.rb
index 4e3af766..f5854dc9 100644
--- a/code/fm/keys.rb
+++ b/code/fm/keys.rb
@@ -513,23 +513,18 @@ module Fm
 				starti
 			end
 
-		when '<cr>', 'l', ';', 'L', '<right>'
-			ascend(@buffer=='L', @buffer=='l')
-
-		# a = run all
-		# d or e = detach
-		# t = run in a terminal
-		# w = wait for <enter> after execution
-		# capital letter inverts
+		when '<cr>', 'l', 'L', '<right>'
+			if currentfile.dir?
+				enter_dir_safely(currentfile.path)
+			else
+				mode = @buffer == 'L' ? 1 : 0
+				Action.run(RunContext.new(getfiles, mode))
+			end
+
 		when /^[ri](\d*)([adetw]*)[ri]$/
 			run_context = RunContext.new(getfiles, $1, $2)
 			Action.run(run_context)
 		
-#		when 'ra'
-#			unless File.directory?(currentfile.path)
-#				Action.run(:all=>true)
-#			end
-
 		when 'ZZ', '<c-d>', ':q<cr>', 'Q'
 			exit