From 2e7b9e7e987027fc800ca354290b2c55fa4ac887 Mon Sep 17 00:00:00 2001 From: Dheepak Krishnamurthy Date: Thu, 13 Aug 2020 09:54:42 -0600 Subject: [PATCH] Add check to see if `g:lazygit_opened` exists --- ftplugin/gitcommit.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ftplugin/gitcommit.vim b/ftplugin/gitcommit.vim index 2b303f7..09b1757 100644 --- a/ftplugin/gitcommit.vim +++ b/ftplugin/gitcommit.vim @@ -1,4 +1,4 @@ -if g:lazygit_opened && g:lazygit_use_neovim_remote && executable("nvr") +if exists("g:lazygit_opened") && g:lazygit_opened && g:lazygit_use_neovim_remote && executable("nvr") augroup lazygit_neovim_remote autocmd! autocmd WinLeave :LazyGit