summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-07-26 23:11:01 +0200
committerBram Moolenaar <Bram@vim.org>2017-07-26 23:11:01 +0200
commit293424c199615b774365db9b412209b102cdfe20 (patch)
tree39d00d7e32fdae01fe1e95e8a456b976f951287c /src
parent4cc93dc85a7aaf6bb1ccccc466f8d5fa523094e4 (diff)
downloadvim-git-293424c199615b774365db9b412209b102cdfe20.tar.gz
patch 8.0.0779: :term without an argument uses empty buffer namev8.0.0779
Problem: :term without an argument uses empty buffer name but runs the snell. Solution: Change the command to the shell earlier.
Diffstat (limited to 'src')
-rw-r--r--src/terminal.c6
-rw-r--r--src/version.c2
2 files changed, 5 insertions, 3 deletions
diff --git a/src/terminal.c b/src/terminal.c
index e4e9cec33..0532d01f9 100644
--- 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)
{
diff --git a/src/version.c b/src/version.c
index 051f75f5c..1654ee361 100644
--- 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,