Skip to content

Commit 293424c

Browse files
committed
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.
1 parent 4cc93dc commit 293424c

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

src/terminal.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,9 @@ ex_terminal(exarg_T *eap)
199199
term->tl_next = first_term;
200200
first_term = term;
201201

202+
if (cmd == NULL || *cmd == NUL)
203+
cmd = p_sh;
204+
202205
if (buflist_findname(cmd) == NULL)
203206
curbuf->b_ffname = vim_strsave(cmd);
204207
else
@@ -227,9 +230,6 @@ ex_terminal(exarg_T *eap)
227230

228231
set_term_and_win_size(term);
229232

230-
if (cmd == NULL || *cmd == NUL)
231-
cmd = p_sh;
232-
233233
/* System dependent: setup the vterm and start the job in it. */
234234
if (term_and_job_init(term, term->tl_rows, term->tl_cols, cmd) == OK)
235235
{

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -769,6 +769,8 @@ static char *(features[]) =
769769

770770
static int included_patches[] =
771771
{ /* Add new patch number below this line */
772+
/**/
773+
779,
772774
/**/
773775
778,
774776
/**/

0 commit comments

Comments
 (0)