Skip to content

Commit e010c72

Browse files
committed
patch 8.2.0314: short name not set for terminal buffer
Problem: Short name not set for terminal buffer. Solution: Set the short name. (closes #5687)
1 parent fa29c8a commit e010c72

3 files changed

Lines changed: 10 additions & 0 deletions

File tree

src/terminal.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -566,6 +566,8 @@ term_start(
566566
}
567567
}
568568
}
569+
vim_free(curbuf->b_sfname);
570+
curbuf->b_sfname = vim_strsave(curbuf->b_ffname);
569571
curbuf->b_fname = curbuf->b_ffname;
570572

571573
if (opt->jo_term_opencmd != NULL)

src/testdir/test_terminal.vim

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2405,3 +2405,9 @@ func Test_issue_5607()
24052405
bw!
24062406
endtry
24072407
endfunc
2408+
2409+
func Test_hidden_terminal()
2410+
let buf = term_start(&shell, #{hidden: 1})
2411+
call assert_equal('', bufname('^$'))
2412+
call StopShellInTerminal(buf)
2413+
endfunc

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -738,6 +738,8 @@ static char *(features[]) =
738738

739739
static int included_patches[] =
740740
{ /* Add new patch number below this line */
741+
/**/
742+
314,
741743
/**/
742744
313,
743745
/**/

0 commit comments

Comments
 (0)