From 4c337c8b12116b8fafb68ba902ddaf6cb474ae6d Mon Sep 17 00:00:00 2001 From: Dheepak Krishnamurthy Date: Sun, 9 Aug 2020 19:50:06 -0600 Subject: [PATCH] Make LazyGitConfig work --- lua/lazygit.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lua/lazygit.lua b/lua/lazygit.lua index b221ba7..afeae2e 100644 --- a/lua/lazygit.lua +++ b/lua/lazygit.lua @@ -26,8 +26,8 @@ local function project_root_dir() end -- try symlinked file location instead - local gitdir = fn.system('cd "' .. fn.fnamemodify(fn.resolve(fn.expand('%:p')), ':h') .. '" && git rev-parse --show-toplevel') - local isgitdir = fn.matchstr(gitdir, '^fatal:.*') == "" + gitdir = fn.system('cd "' .. fn.fnamemodify(fn.resolve(fn.expand('%:p')), ':h') .. '" && git rev-parse --show-toplevel') + isgitdir = fn.matchstr(gitdir, '^fatal:.*') == "" if isgitdir then return trim(gitdir) end @@ -178,11 +178,11 @@ local function lazygitconfig() -- directory does not exist fn.mkdir(fn.fnamemodify(config_file, ":h")) end - vim.cmd('edit "' .. config_file .. '"') + vim.cmd('edit ' .. config_file) vim.cmd([[execute "silent! 0read !lazygit -c"]]) vim.cmd([[execute "normal 1G"]]) else - vim.cmd('edit "' .. config_file .. '"') + vim.cmd('edit ' .. config_file) end end