diff options
author | Mathieu Xhonneux <m.xhonneux@gmail.com> | 2015-08-16 16:14:24 +0200 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2015-08-30 17:15:50 -0400 |
commit | 79b6ab21d84803dd37da9ec8d5a1c32a79b401cd (patch) | |
tree | d74ec36a471233aa96da46cedbfb00b5a6af7535 | |
parent | 82296510879d6e18036ba45447d348bba41be52e (diff) | |
download | rneovim-79b6ab21d84803dd37da9ec8d5a1c32a79b401cd.tar.gz rneovim-79b6ab21d84803dd37da9ec8d5a1c32a79b401cd.tar.bz2 rneovim-79b6ab21d84803dd37da9ec8d5a1c32a79b401cd.zip |
termopen(): remove `name` feature. #3181
Problem: Commands like `:e term://top` display `term://.//PID:(null)`
instead of `term://.//PID:top`.
Solution: Remove the optional `name` argument (it allowed
ambiguous/potentially destructive cases, so it was problematic anyway).
Closes #3113
Closes #2924
-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; |