1
0
Fork 0
mirror of https://github.com/jiriks74/presence.nvim synced 2025-04-05 12:03:00 +02:00

prevent error messages when opening unnamed buffer

This commit is contained in:
NotCreative21 2022-03-29 21:30:48 -04:00
parent ebdf23b9b1
commit 94af2d0f32

View file

@ -765,7 +765,7 @@ function Presence:update_for_buffer(buffer, should_debounce)
local filename = self.get_filename(buffer, self.os.path_separator)
local parent_dirpath = self.get_dir_path(buffer, self.os.path_separator)
local extension = filename and self.get_file_extension(filename) or nil
self.log:debug(string.format("Parsed filename %s with %s extension", filename, extension or "no"))
self.log:debug(string.format("Parsed filename %s with %s extension", filename or "no", extension or "no"))
-- Return early if there is no valid activity status text to set
local status_text = self:get_status_text(filename)