diff options
-rw-r--r-- | src/nvim/eval.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c index 3c9d725667..02cc9b8f5b 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -16136,12 +16136,9 @@ static void f_termopen(typval_T *argvars, typval_T *rettv) } int pid = data->proc.pty.process.pid; - // Get the desired name of the buffer. - char *name = job_opts ? - (char *)get_dict_string(job_opts, (char_u *)"name", false) : cmd; char buf[1024]; - // format the title with the pid to conform with the term:// URI - snprintf(buf, sizeof(buf), "term://%s//%d:%s", cwd, pid, name); + // format the title with the pid to conform with the term:// URI + snprintf(buf, sizeof(buf), "term://%s//%d:%s", cwd, pid, cmd); // at this point the buffer has no terminal instance associated yet, so unset // the 'swapfile' option to ensure no swap file will be created curbuf->b_p_swf = false; |