From d7a2175218218ce2e9d5f12bc93e9fdd81b9f30b Mon Sep 17 00:00:00 2001 From: Dheepak Krishnamurthy Date: Sun, 12 Apr 2020 06:00:42 -0600 Subject: [PATCH] Remove GIT_EDITOR for Windows --- lua/lazygit.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lua/lazygit.lua b/lua/lazygit.lua index 4740bb2..93e45cc 100644 --- a/lua/lazygit.lua +++ b/lua/lazygit.lua @@ -17,7 +17,10 @@ local function project_root_dir() end local function exec_lazygit_command(root_dir) - local cmd = "GIT_EDITOR=nvim lazygit " .. "-p " .. root_dir + local cmd = "lazygit " .. "-p " .. root_dir + if ( fn.has("win64") == 0 and fn.has("win32") == 0 and fn.has("win16") == 0 ) then + cmd = "GIT_EDITOR=nvim " .. cmd + end -- ensure that the buffer is closed on exit execute([[ call termopen('%s', {'on_exit': {job_id, code, event-> luaeval("require('lazygit').on_exit(" . job_id . "," . code . "," . event . ")")}})