diff options
author | hut <hut@lavabit.com> | 2009-07-19 04:30:18 +0200 |
---|---|---|
committer | hut <hut@lavabit.com> | 2009-07-19 04:30:18 +0200 |
commit | 7129d105d96961d0298837ccdb053000aecf6602 (patch) | |
tree | d9dbc729744b3e83be357d1f2a76d837a82466e9 | |
parent | c71a21f62dc6d6b535bbfba62bfb015b4c0be32a (diff) | |
download | ranger-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.
-rw-r--r-- | code/help.rb | 1 | ||||
-rw-r--r-- | code/keys.rb | 7 |
2 files changed, 5 insertions, 3 deletions
diff --git a/code/help.rb b/code/help.rb index 76a2b75b..1726e484 100644 --- a/code/help.rb +++ b/code/help.rb @@ -162,6 +162,7 @@ module Fm L Run in a different way: mode 1, no flags r<n><f>r Run with mode <n> and flags <f>. example: r3adr Default mode: 0, default flags: no flags at all + i and I Like l and L but without the flag "a" What are flags: Letters that specify details on how ranger should run the program. 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' |