1
0
mirror of https://github.com/jiriks74/presence.nvim synced 2024-11-23 20:37:50 +01:00

Skip updates for unnamed buffers

This commit is contained in:
Andrew Kwon 2021-03-18 22:04:20 -07:00
parent c8ba01782e
commit 19764718e5

@ -515,6 +515,10 @@ Presence.update = Presence.discord_event(function(self, buffer, should_debounce)
self:update_for_buffer(buffer, should_debounce) self:update_for_buffer(buffer, should_debounce)
else else
self.get_current_buffer(function(current_buffer) self.get_current_buffer(function(current_buffer)
if not current_buffer or current_buffer == "" then
return self.log:debug("Current buffer not named, skipping...")
end
self:update_for_buffer(current_buffer, should_debounce) self:update_for_buffer(current_buffer, should_debounce)
end) end)
end end