Fix buffer existing bug

This commit is contained in:
Dheepak Krishnamurthy
2021-07-07 21:38:54 -06:00
parent 480e1c1c05
commit 52b911aed6

View File

@@ -130,7 +130,7 @@ local function open_floating_window()
vim.cmd('set winhl=Normal:Floating')
-- create a unlisted scratch buffer
if LAZYGIT_BUFFER == nil or vim.fn.bufwinnr(LAZYGIT_BUFFER) > 0 then
if LAZYGIT_BUFFER == nil or vim.fn.bufwinnr(LAZYGIT_BUFFER) == 0 then
LAZYGIT_BUFFER = api.nvim_create_buf(false, true)
else
LAZYGIT_LOADED = true