From 4c5e60cbe14cde745d8590cfcc3f098d3e060ca4 Mon Sep 17 00:00:00 2001 From: hut Date: Mon, 26 Apr 2010 21:37:31 +0200 Subject: defaults.commands: fixed :find with uppercase search strings --- ranger/defaults/commands.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ranger/defaults/commands.py b/ranger/defaults/commands.py index 8117f1f3..6175b92c 100644 --- a/ranger/defaults/commands.py +++ b/ranger/defaults/commands.py @@ -145,8 +145,12 @@ class find(Command): deq = deque(cwd.files) deq.rotate(-cwd.pointer) i = 0 + case_insensitive = arg.lower() == arg for fsobj in deq: - filename = fsobj.basename_lower + if case_insensitive: + filename = fsobj.basename_lower + else: + filename = fsobj.basename if arg in filename: self.count += 1 if self.count == 1: -- cgit 1.4.1-2-gfad0