diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2018-12-05 19:14:19 -0500 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2018-12-06 01:14:19 +0100 |
commit | 769762834533292e1d6a34b3846213d3896dc386 (patch) | |
tree | 5d96fed6cf87682b7767156138f8d0f8929dd15a /src/nvim/eval.c | |
parent | 77b5e9ae25fc79cd647ed6a0535b234bcc82180d (diff) | |
download | rneovim-769762834533292e1d6a34b3846213d3896dc386.tar.gz rneovim-769762834533292e1d6a34b3846213d3896dc386.tar.bz2 rneovim-769762834533292e1d6a34b3846213d3896dc386.zip |
vim-patch:8.0.1425: execute() does not work in completion of user command (#9317)
Problem: execute() does not work in completion of user command. (thinca)
Solution: Switch off redir_off and restore it. (Ozaki Kiichi, closes vim/vim#2492)
https://github.com/vim/vim/commit/2095148277cf1c4e7b3bbaf4e34812b7cfe3011b
Diffstat (limited to 'src/nvim/eval.c')
-rw-r--r-- | src/nvim/eval.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c index 5d2bdc210b..fac56e9206 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -8125,6 +8125,7 @@ static void f_execute(typval_T *argvars, typval_T *rettv, FunPtr fptr) const int save_msg_silent = msg_silent; const int save_emsg_silent = emsg_silent; const bool save_emsg_noredir = emsg_noredir; + const bool save_redir_off = redir_off; garray_T *const save_capture_ga = capture_ga; if (check_secure()) { @@ -8152,6 +8153,7 @@ static void f_execute(typval_T *argvars, typval_T *rettv, FunPtr fptr) garray_T capture_local; ga_init(&capture_local, (int)sizeof(char), 80); capture_ga = &capture_local; + redir_off = false; if (argvars[0].v_type != VAR_LIST) { do_cmdline_cmd(tv_get_string(&argvars[0])); @@ -8169,6 +8171,7 @@ static void f_execute(typval_T *argvars, typval_T *rettv, FunPtr fptr) msg_silent = save_msg_silent; emsg_silent = save_emsg_silent; emsg_noredir = save_emsg_noredir; + redir_off = save_redir_off; ga_append(capture_ga, NUL); rettv->v_type = VAR_STRING; |