From 2736a2f69e8e407bc3df38a43faab173f37e7c4c Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Sun, 10 Oct 2021 20:16:59 +0900 Subject: [PATCH] [vim] Empty out $FZF_DEFAULT_COMMAND before unletting it For Vim 8.0.1831 and below * https://github.com/vim/vim/issues/1116 Fix https://github.com/junegunn/fzf.vim/issues/1301 --- plugin/fzf.vim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugin/fzf.vim b/plugin/fzf.vim index 4190e0e3..b17361d2 100644 --- a/plugin/fzf.vim +++ b/plugin/fzf.vim @@ -519,7 +519,8 @@ finally if len(prev_default_command) let $FZF_DEFAULT_COMMAND = prev_default_command else - execute 'unlet $FZF_DEFAULT_COMMAND' + let $FZF_DEFAULT_COMMAND = '' + silent! execute 'unlet $FZF_DEFAULT_COMMAND' endif endif let [&shell, &shellslash, &shellcmdflag, &shellxquote] = [shell, shellslash, shellcmdflag, shellxquote]