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]".
e561a7e2fa
This commit is contained in:
Jan Edmund Lazo 2019-06-26 20:50:08 -04:00
parent 59b35d6a10
commit 58cf81914d

View File

@ -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]");
}