Skip to content

Commit

Permalink
patch 8.0.0779: :term without an argument uses empty buffer name
Browse files Browse the repository at this point in the history
Problem:    :term without an argument uses empty buffer name but runs the
            snell.
Solution:   Change the command to the shell earlier.
  • Loading branch information
brammool committed Jul 26, 2017
1 parent 4cc93dc commit 293424c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/terminal.c
Expand Up @@ -199,6 +199,9 @@ ex_terminal(exarg_T *eap)
term->tl_next = first_term;
first_term = term;

if (cmd == NULL || *cmd == NUL)
cmd = p_sh;

if (buflist_findname(cmd) == NULL)
curbuf->b_ffname = vim_strsave(cmd);
else
Expand Down Expand Up @@ -227,9 +230,6 @@ ex_terminal(exarg_T *eap)

set_term_and_win_size(term);

if (cmd == NULL || *cmd == NUL)
cmd = p_sh;

/* System dependent: setup the vterm and start the job in it. */
if (term_and_job_init(term, term->tl_rows, term->tl_cols, cmd) == OK)
{
Expand Down
2 changes: 2 additions & 0 deletions src/version.c
Expand Up @@ -769,6 +769,8 @@ static char *(features[]) =

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

0 comments on commit 293424c

Please sign in to comment.