diff --git a/src/browser.c b/src/browser.c index fb8f838c..96d43cc5 100644 --- a/src/browser.c +++ b/src/browser.c @@ -261,8 +261,6 @@ void findfile(const char *needle, bool forwards) { size_t looking_at = selected; /* The location in the file list of the filename we're looking at. */ - const char *thename; - /* The plain filename, without the path. */ /* Step through each filename in the list until a match is found or * we've come back to the point where we started. */ @@ -279,12 +277,9 @@ void findfile(const char *needle, bool forwards) } } - /* Get the bare filename, without the path. */ - thename = tail(filelist[looking_at]); - /* If the needle matches, we're done. And if we're back at the file * where we started, it is the only occurrence. */ - if (mbstrcasestr(thename, needle)) { + if (mbstrcasestr(tail(filelist[looking_at]), needle)) { if (looking_at == selected) statusbar(_("This is the only occurrence")); break;