about summary refs log tree commit diff stats
path: root/code/keys.rb
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2009-07-19 04:30:18 +0200
committerhut <hut@lavabit.com>2009-07-19 04:30:18 +0200
commit7129d105d96961d0298837ccdb053000aecf6602 (patch)
treed9dbc729744b3e83be357d1f2a76d837a82466e9 /code/keys.rb
parentc71a21f62dc6d6b535bbfba62bfb015b4c0be32a (diff)
downloadranger-7129d105d96961d0298837ccdb053000aecf6602.tar.gz
new keys [i], [I] are like [l], [L] without a-flag
that means, [i] will always run the currently highlighted file only,
whereas [l] will run marked files instead, if there are any marked files.
Diffstat (limited to 'code/keys.rb')
-rw-r--r--code/keys.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/code/keys.rb b/code/keys.rb
index add38dbc..75ad8a8a 100644
--- a/code/keys.rb
+++ b/code/keys.rb
@@ -252,12 +252,13 @@ module Fm
 		when 'K'
 			@pwd.pos -= lines/2
 
-		when '<cr>', 'l', 'L', '<right>'
+		when '<cr>', '<right>', /^[li]$/i
 			if currentfile.dir?
 				enter_dir_safely(currentfile.path)
 			else
-				mode = @buffer == 'L' ? 1 : 0
-				Action.run(RunContext.new(getfiles, mode, 'a'))
+				mode  = @buffer =~ /[LI]/ ?  1  : 0
+				flags = @buffer =~ /[lL]/ ? 'a' : ''
+				Action.run(RunContext.new(getfiles, mode, flags))
 			end
 
 		when 'n'