Skip to content

Commit

Permalink
patch 8.2.0314: short name not set for terminal buffer
Browse files Browse the repository at this point in the history
Problem:    Short name not set for terminal buffer.
Solution:   Set the short name. (closes vim#5687)
  • Loading branch information
brammool committed Feb 24, 2020
1 parent fa29c8a commit e010c72
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/terminal.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 6 additions & 0 deletions src/testdir/test_terminal.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 2 additions & 0 deletions src/version.c
Original file line number Diff line number Diff line change
Expand Up @@ -738,6 +738,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
314,
/**/
313,
/**/
Expand Down

0 comments on commit e010c72

Please sign in to comment.