]> granicus.if.org Git - vim/commitdiff
patch 8.0.0779: :term without an argument uses empty buffer name v8.0.0779
authorBram Moolenaar <Bram@vim.org>
Wed, 26 Jul 2017 21:11:01 +0000 (23:11 +0200)
committerBram Moolenaar <Bram@vim.org>
Wed, 26 Jul 2017 21:11:01 +0000 (23:11 +0200)
Problem:    :term without an argument uses empty buffer name but runs the
            snell.
Solution:   Change the command to the shell earlier.

src/terminal.c
src/version.c

index e4e9cec33ae537497be4e1cd1e1477647d7bfd9b..0532d01f9fb32df7a95273a6664e1374c4399d15 100644 (file)
@@ -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
@@ -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)
     {
index 051f75f5c319a06872fadb5d874bea6242e29251..1654ee3613d3736e176ecfacd7f812f2695ce1dd 100644 (file)
@@ -769,6 +769,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    779,
 /**/
     778,
 /**/