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]".
diff --git a/src/buffer.c b/src/buffer.c
index f64255d..e95abfa 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -5825,8 +5825,8 @@
if (buf->b_term != NULL)
return term_get_status_text(buf->b_term);
#endif
- if (buf->b_sfname != NULL)
- return buf->b_sfname;
+ if (buf->b_fname != NULL)
+ return buf->b_fname;
return (char_u *)_("[Scratch]");
}