From 7129d105d96961d0298837ccdb053000aecf6602 Mon Sep 17 00:00:00 2001 From: hut Date: Sun, 19 Jul 2009 04:30:18 +0200 Subject: 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. --- code/help.rb | 1 + 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 rr Run with mode and flags . 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 '', 'l', 'L', '' + when '', '', /^[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' -- cgit 1.4.1-2-gfad0