Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

E749: Empty buffer error in ftdetect/nftables.vim #2

Open
kevinoid opened this issue Oct 7, 2024 · 0 comments · May be fixed by #3
Open

E749: Empty buffer error in ftdetect/nftables.vim #2

kevinoid opened this issue Oct 7, 2024 · 0 comments · May be fixed by #3
Labels
bug Something isn't working

Comments

@kevinoid
Copy link

kevinoid commented Oct 7, 2024

After installing vim-nftables (with git clone https://github.com/egberts/vim-nftables.git ~/.vim/pack/all/start/vim-nftables), running Vim 9.1.709 produces the following errors:

Error detected while processing /home/kevin/.vim/pack/all/start/vim-nftables/ftdete    line    1:
E749: Empty buffer
line    2:
E488: Trailing characters: Detect file type by use of shebang: # Detect file type b
line   11:
E488: Trailing characters: Detect file type by use of shebang:     # Detect file ty
line   14:
E488: Trailing characters: Detect file type by its filetype:     # Detect file type    Press ENTER or type command to continue

Similarly, running NVIM 0.9.5 produces:

Error detected while processing /usr/share/nvim/runtime/filetype.lua:
E5113: Error while calling lua chunk: vim/_editor.lua:341: /usr/share/nvim/runtime/file
type.lua..nvim_exec2() called at /usr/share/nvim/runtime/filetype.lua:0../home/kevin/.v
im/pack/all/start/vim-nftables/ftdetect/nftables.vim, line 1: Vim(#):E749: empty buffer

stack traceback:
        [C]: in function 'nvim_exec2'
        vim/_editor.lua:341: in function 'cmd'
        /usr/share/nvim/runtime/filetype.lua:36: in main chunk
Press ENTER or type command to continue

I believe the error is caused by # characters used for comments instead of ", which is only supported by Vim9 Script. The regression was introduced in af699d8.

Thanks for maintaining this package!
Kevin

kevinoid added a commit to kevinoid/vim-nftables that referenced this issue Oct 7, 2024
The `#` character is only recognized as a comment marker in Vim9 Script.
Since `vim9script` is not set, use `"` for comments.

Fixes: egberts#2
Fixes: af699d8 ("Waypoint 1")
Signed-off-by: Kevin Locke <[email protected]>
@kevinoid kevinoid linked a pull request Oct 7, 2024 that will close this issue
@egberts egberts pinned this issue Nov 20, 2024
@egberts egberts added the bug Something isn't working label Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants