Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lua/lualine/components/diff/git_diff.lua
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ end
function M.update_diff_args()
-- Don't show git diff when current buffer doesn't have a filename
active_bufnr = tostring(vim.api.nvim_get_current_buf())
if #vim.fn.expand('%') == 0 then
if #vim.fn.expand('%') == 0 or vim.fn.executable('git') == 0 then
M.diff_args = nil
git_diff = nil
return
Expand Down