diff options
Diffstat (limited to 'src/fileio.c')
-rw-r--r-- | src/fileio.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/fileio.c b/src/fileio.c index e8d4e27bbd..a0947aa6d6 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -5290,8 +5290,11 @@ shorten_fnames(force) } if (p == NULL || buf->b_fname == NULL) buf->b_fname = buf->b_ffname; - mf_fullname(buf->b_ml.ml_mfp); } + + /* Always make the swap file name a full path, a "nofile" buffer may + * also have a swap file. */ + mf_fullname(buf->b_ml.ml_mfp); } #ifdef FEAT_WINDOWS status_redraw_all(); |