Skip to content

Commit

Permalink
fix: accommodate watcher receiving a nil filename.
Browse files Browse the repository at this point in the history
  • Loading branch information
otrho committed Aug 9, 2023
1 parent 287fffb commit ffcdbc6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/gitsigns/watcher.lua
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ function M.watch_gitdir(bufnr, gitdir)

local info = string.format("Git dir update: '%s' %s", filename, inspect(events))

if vim.endswith(filename, '.lock') then
if filename == nil or vim.endswith(filename, '.lock') then
dprintf('%s (ignoring)', info)
return
end
Expand Down

0 comments on commit ffcdbc6

Please sign in to comment.