summaryrefslogtreecommitdiffstats
path: root/src/buffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/buffer.c b/src/buffer.c
index 35711f5feb..dfdb0c430d 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -2932,7 +2932,7 @@ buflist_match(
// First try the short file name, then the long file name.
match = fname_match(rmp, buf->b_sfname, ignore_case);
- if (match == NULL)
+ if (match == NULL && rmp->regprog != NULL)
match = fname_match(rmp, buf->b_ffname, ignore_case);
return match;