Commit 499e074
authored
fix(filtetype.lua): don't fail on integer filepath (#498)
This looks to be very similar to #465
I have been encountering the below error when the filepath is an integer.
```
Error executing vim.schedule lua callback: ...scope.nvim/lua/telescope/previewers/buffer_previewer.lua:428: Error executing lua: ...al/share/nvim/lazy/plenary.nvim/lua/plenary/filetype.lua:123: attempt to index local 'filepath' (a number value)
stack traceback:
...al/share/nvim/lazy/plenary.nvim/lua/plenary/filetype.lua:123: in function 'detect_from_name'
...al/share/nvim/lazy/plenary.nvim/lua/plenary/filetype.lua:167: in function 'detect'
...scope.nvim/lua/telescope/previewers/buffer_previewer.lua:434: in function <...scope.nvim/lua/telescope/previewers/buffer_previewer.lua:428>
[C]: in function 'nvim_buf_call'
...scope.nvim/lua/telescope/previewers/buffer_previewer.lua:428: in function <...scope.nvim/lua/telescope/previewers/buffer_previewer.lua:422>
stack traceback:
[C]: in function 'nvim_buf_call'
...scope.nvim/lua/telescope/previewers/buffer_previewer.lua:428: in function <...scope.nvim/lua/telescope/previewers/buffer_previewer.lua:422>
```1 parent 5254482 commit 499e074
1 file changed
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
163 | 167 | | |
164 | 168 | | |
165 | 169 | | |
| |||
0 commit comments