Error when using `gf` on empty lines or non-file text
## Description
When using the `gf` command with blade-nav.nvim on a line that doesn't contain a valid file path or component reference, an error message occurs:
```
E5108: Error executing lua: Vim(normal):E446: No file name under cursor
stack traceback:
[C]: in function 'execute'
.../blade-nav.nvim/lua/blade-nav/gf.lua:29: in function 'gf'
.../blade-nav.nvim/lua/blade-nav/gf.lua:745: in function <.../blade-nav.nvim/lua/blade-nav/gf.lua:744>
```
## Steps to Reproduce
1. Open a Blade template file
2. Position cursor on an empty line or text that isn't a blade component file path
3. Press `gf`
4. Error message is displayed
## Suggested Fix
If this behavior isn't intentional and you'd like to change it, here's the PR
- #42
关闭于 2025-04-23 1 条评论