From a1493215a2e18f3b0a18a7d77222e0bf93ca32b3 Mon Sep 17 00:00:00 2001 From: ZyX Date: Sun, 28 Feb 2016 04:34:27 +0300 Subject: Revert "Merge pull request #4362 from justinmk/termopen" This reverts commit b01db02de4753908b3595b5ada0a6929e595e930, reversing changes made to 62321e5132ed29b11f79c8a56ca172d56b9ac042. --- src/nvim/main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src') diff --git a/src/nvim/main.c b/src/nvim/main.c index 09fe29c087..a2aca65001 100644 --- a/src/nvim/main.c +++ b/src/nvim/main.c @@ -324,8 +324,7 @@ int main(int argc, char **argv) "'\\c\\mterm://\\%(.\\{-}//\\%(\\d\\+:\\)\\?\\)\\?\\zs.*'), " // capture the working directory "{'cwd': get(matchlist(expand(\"\"), " - "'\\c\\mterm://\\(.\\{-}\\)//'), 1, '')})" - "|doautocmd TermOpen"); + "'\\c\\mterm://\\(.\\{-}\\)//'), 1, '')})"); /* Execute --cmd arguments. */ exe_pre_commands(¶ms); -- cgit From b32396170f2c1cd17f36b8a5eb1ad313f6f9a8c3 Mon Sep 17 00:00:00 2001 From: ZyX Date: Sun, 28 Feb 2016 04:49:26 +0300 Subject: main: Make using :edit term:// run TermOpen event Ref #4306 --- src/nvim/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/nvim/main.c b/src/nvim/main.c index a2aca65001..92e8774ec4 100644 --- a/src/nvim/main.c +++ b/src/nvim/main.c @@ -317,7 +317,7 @@ int main(int argc, char **argv) } // open terminals when opening files that start with term:// - do_cmdline_cmd("autocmd BufReadCmd term://* " + do_cmdline_cmd("autocmd BufReadCmd term://* nested " ":call termopen( " // Capture the command string "matchstr(expand(\"\"), " -- cgit From c6eeefa339ee3452866ed5517b6e8a3decc1ec67 Mon Sep 17 00:00:00 2001 From: ZyX Date: Sun, 28 Feb 2016 06:29:38 +0300 Subject: main: Move term:// protocol name to a macros --- src/nvim/main.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/nvim/main.c b/src/nvim/main.c index 92e8774ec4..5b5c8a22aa 100644 --- a/src/nvim/main.c +++ b/src/nvim/main.c @@ -317,14 +317,16 @@ int main(int argc, char **argv) } // open terminals when opening files that start with term:// - do_cmdline_cmd("autocmd BufReadCmd term://* nested " +#define PROTO "term://" + do_cmdline_cmd("autocmd BufReadCmd " PROTO "* nested " ":call termopen( " // Capture the command string "matchstr(expand(\"\"), " - "'\\c\\mterm://\\%(.\\{-}//\\%(\\d\\+:\\)\\?\\)\\?\\zs.*'), " + "'\\c\\m" PROTO "\\%(.\\{-}//\\%(\\d\\+:\\)\\?\\)\\?\\zs.*'), " // capture the working directory "{'cwd': get(matchlist(expand(\"\"), " - "'\\c\\mterm://\\(.\\{-}\\)//'), 1, '')})"); + "'\\c\\m" PROTO "\\(.\\{-}\\)//'), 1, '')})"); +#undef PROTO /* Execute --cmd arguments. */ exe_pre_commands(¶ms); -- cgit