diff options
author | hut <hut@lavabit.com> | 2009-06-13 04:12:18 +0200 |
---|---|---|
committer | hut <hut@lavabit.com> | 2009-06-13 04:12:18 +0200 |
commit | bd627dc4f2d009642de3ada13cbdc547490baf68 (patch) | |
tree | 116e882dd0d303cd8999e1a83c47965ba4a9458b /code/fm/keys.rb | |
parent | f55eb9bf0d7d2c252a6591324bfd8392d30c53da (diff) | |
download | ranger-bd627dc4f2d009642de3ada13cbdc547490baf68.tar.gz |
fixing & cleaning up
Diffstat (limited to 'code/fm/keys.rb')
-rw-r--r-- | code/fm/keys.rb | 21 |
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 |