diff options
Diffstat (limited to 'src/nvim/main.c')
-rw-r--r-- | src/nvim/main.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/nvim/main.c b/src/nvim/main.c index 005f4dcc77..eb67483d08 100644 --- a/src/nvim/main.c +++ b/src/nvim/main.c @@ -270,11 +270,6 @@ int main(int argc, char **argv) setbuf(stdout, NULL); - /* This message comes before term inits, but after setting "silent_mode" - * when the input is not a tty. */ - if (GARGCOUNT > 1 && !silent_mode) - printf(_("%d files to edit\n"), GARGCOUNT); - full_screen = true; check_tty(¶ms); @@ -320,14 +315,18 @@ int main(int argc, char **argv) // open terminals when opening files that start with term:// #define PROTO "term://" + do_cmdline_cmd("augroup nvim_terminal"); + do_cmdline_cmd("autocmd!"); do_cmdline_cmd("autocmd BufReadCmd " PROTO "* nested " - ":call termopen( " + ":if !exists('b:term_title')|call termopen( " // Capture the command string "matchstr(expand(\"<amatch>\"), " "'\\c\\m" PROTO "\\%(.\\{-}//\\%(\\d\\+:\\)\\?\\)\\?\\zs.*'), " // capture the working directory "{'cwd': get(matchlist(expand(\"<amatch>\"), " - "'\\c\\m" PROTO "\\(.\\{-}\\)//'), 1, '')})"); + "'\\c\\m" PROTO "\\(.\\{-}\\)//'), 1, '')})" + "|endif"); + do_cmdline_cmd("augroup END"); #undef PROTO /* Execute --cmd arguments. */ |