changeset 11794:2e7e77e28063 v8.0.0779

patch 8.0.0779: :term without an argument uses empty buffer name commit https://github.com/vim/vim/commit/293424c199615b774365db9b412209b102cdfe20 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Jul 26 23:11:01 2017 +0200 patch 8.0.0779: :term without an argument uses empty buffer name Problem: :term without an argument uses empty buffer name but runs the snell. Solution: Change the command to the shell earlier.
author Christian Brabandt <cb@256bit.org>
date Wed, 26 Jul 2017 23:15:04 +0200
parents 393a5d6b794a
children 10ffc9d70c82
files src/terminal.c src/version.c
diffstat 2 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/terminal.c
+++ b/src/terminal.c
@@ -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)
     {
--- a/src/version.c
+++ b/src/version.c
@@ -770,6 +770,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    779,
+/**/
     778,
 /**/
     777,