diff options
Diffstat (limited to 'code')
-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' |