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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c
index 6a2c06b91f..043ae420cd 100644
--- a/src/nvim/buffer.c
+++ b/src/nvim/buffer.c
@@ -5241,8 +5241,8 @@ char_u *buf_spname(buf_T *buf)
// There is no _file_ when 'buftype' is "nofile", b_sfname
// contains the name as specified by the user.
if (bt_nofile(buf)) {
- if (buf->b_sfname != NULL) {
- return buf->b_sfname;
+ if (buf->b_fname != NULL) {
+ return buf->b_fname;
}
return (char_u *)_("[Scratch]");
}