aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/buffer.c
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-06-26 20:50:08 -0400
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-06-26 20:51:18 -0400
commit58cf81914da3fbcc875cbd4954b62a314be31c9a (patch)
tree1639b988217a7411793a05ae384149b7ea4489f4 /src/nvim/buffer.c
parent59b35d6a10bed9bd789274b6f1fe15de7c9c2bd9 (diff)
downloadrneovim-58cf81914da3fbcc875cbd4954b62a314be31c9a.tar.gz
rneovim-58cf81914da3fbcc875cbd4954b62a314be31c9a.tar.bz2
rneovim-58cf81914da3fbcc875cbd4954b62a314be31c9a.zip
vim-patch:8.0.1013: terminal window behaves different from a buffer with changes
Problem: A terminal window with a running job behaves different from a window containing a changed buffer. Solution: Do not set 'bufhidden' to "hide". Fix that a buffer where a terminal used to run is listed as "[Scratch]". https://github.com/vim/vim/commit/e561a7e2fa511d643c9692d26f4cf65378fd1983
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]");
}