Skip to content

Commit

Permalink
fix: prevent pfiletype from failing when bufname is nil (nvim-telesco…
Browse files Browse the repository at this point in the history
…pe#2531)

* Prevent pfiletype from failing when bufname is nil

* Fix code style
  • Loading branch information
pijusn authored and abelmul committed Jun 6, 2023
1 parent 44fcb5f commit 1e9ad19
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/telescope/previewers/buffer_previewer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ previewers.new_buffer_previewer = function(opts)
data = {
title = entry.preview_title,
bufname = self.state.bufname,
filetype = pfiletype.detect(self.state.bufname),
filetype = pfiletype.detect(self.state.bufname or ""),
},
})
end)
Expand Down

0 comments on commit 1e9ad19

Please sign in to comment.