]> granicus.if.org Git - vim/commitdiff
patch 8.2.0314: short name not set for terminal buffer v8.2.0314
authorBram Moolenaar <Bram@vim.org>
Mon, 24 Feb 2020 20:37:54 +0000 (21:37 +0100)
committerBram Moolenaar <Bram@vim.org>
Mon, 24 Feb 2020 20:37:54 +0000 (21:37 +0100)
Problem:    Short name not set for terminal buffer.
Solution:   Set the short name. (closes #5687)

src/terminal.c
src/testdir/test_terminal.vim
src/version.c

index 10bfae8424041f815fb92f093e64b7b50213b09d..342275e40ca6ef52360261bad9f810da98b76e66 100644 (file)
@@ -566,6 +566,8 @@ term_start(
            }
        }
     }
+    vim_free(curbuf->b_sfname);
+    curbuf->b_sfname = vim_strsave(curbuf->b_ffname);
     curbuf->b_fname = curbuf->b_ffname;
 
     if (opt->jo_term_opencmd != NULL)
index b86614de5c5acf50abafc6e65d7a57a6bf547e7c..20d27bc02226f0c0aca30ac02bb496a6e49af618 100644 (file)
@@ -2405,3 +2405,9 @@ func Test_issue_5607()
     bw!
   endtry
 endfunc
+
+func Test_hidden_terminal()
+  let buf = term_start(&shell, #{hidden: 1})
+  call assert_equal('', bufname('^$'))
+  call StopShellInTerminal(buf)
+endfunc
index 2f3e7683efec73294706eb6c8663f939ff61bb86..7f2a454ccf1ced12f850137aa013dccb71ab9176 100644 (file)
@@ -738,6 +738,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    314,
 /**/
     313,
 /**/