diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2016-02-28 11:46:04 -0500 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2016-02-28 11:46:04 -0500 |
commit | 8ade191b7ab6dec93b09259ac4a370ed5b29df3a (patch) | |
tree | 09afa1739493986c3b93a680075506d82aea368d /src | |
parent | 9d41060c32b472b69ba1619056ee99691a6ff1c4 (diff) | |
parent | 0409cfded5ca126a734e99657182cb4837f149c9 (diff) | |
download | rneovim-8ade191b7ab6dec93b09259ac4a370ed5b29df3a.tar.gz rneovim-8ade191b7ab6dec93b09259ac4a370ed5b29df3a.tar.bz2 rneovim-8ade191b7ab6dec93b09259ac4a370ed5b29df3a.zip |
Merge pull request #4364 from ZyX-I/proper-e-term
Replace hack used to run TermOpen with nested modifier
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/main.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/nvim/main.c b/src/nvim/main.c index 09fe29c087..5b5c8a22aa 100644 --- a/src/nvim/main.c +++ b/src/nvim/main.c @@ -317,15 +317,16 @@ int main(int argc, char **argv) } // open terminals when opening files that start with term:// - do_cmdline_cmd("autocmd BufReadCmd term://* " +#define PROTO "term://" + do_cmdline_cmd("autocmd BufReadCmd " PROTO "* nested " ":call termopen( " // Capture the command string "matchstr(expand(\"<amatch>\"), " - "'\\c\\mterm://\\%(.\\{-}//\\%(\\d\\+:\\)\\?\\)\\?\\zs.*'), " + "'\\c\\m" PROTO "\\%(.\\{-}//\\%(\\d\\+:\\)\\?\\)\\?\\zs.*'), " // capture the working directory "{'cwd': get(matchlist(expand(\"<amatch>\"), " - "'\\c\\mterm://\\(.\\{-}\\)//'), 1, '')})" - "|doautocmd TermOpen"); + "'\\c\\m" PROTO "\\(.\\{-}\\)//'), 1, '')})"); +#undef PROTO /* Execute --cmd arguments. */ exe_pre_commands(¶ms); |