aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/buffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/buffer.c')
-rw-r--r--src/nvim/buffer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c
index f9ad16e357..2c9f997ac1 100644
--- a/src/nvim/buffer.c
+++ b/src/nvim/buffer.c
@@ -2366,7 +2366,7 @@ static char_u *buflist_match(regmatch_T *rmp, buf_T *buf, bool ignore_case)
{
// First try the short file name, then the long file name.
char_u *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;