When using vim.g.lazygit_floating_window_use_plenary = 1,
Nothing is returned by plenary.percentage_range_window from open_floating_window, and win/buffer variables are nil.
As result LazyGit buffer is not closed in lazygit.on_exit callback due to an exception from vim.api.nvim_win_close(win, true): ua/lazygit.lua:28: Expected Lua number
In addition, after LazyGit exit, the window is still opened with the text: [Process exited 0]
This PR fixes the issue by returning ret.win_id, ret.bufnr from open_floating_window when plenary is used.
When using
vim.g.lazygit_floating_window_use_plenary = 1
, Nothing is returned byplenary.percentage_range_window
from open_floating_window, andwin
/buffer
variables arenil
.As result LazyGit buffer is not closed in lazygit.on_exit callback due to an exception from
vim.api.nvim_win_close(win, true)
: ua/lazygit.lua:28: Expected Lua numberIn addition, after LazyGit exit, the window is still opened with the text:
[Process exited 0]
This PR fixes the issue by returning
ret.win_id, ret.bufnr
from open_floating_window when plenary is used.