Skip to content

Tracebacks during file opening #7

@tobixx

Description

@tobixx

This happens on every file opening:

Error detected while processing BufNewFile Autocommands for "*":                                                                                                                                                                              
Error executing lua callback: ...en/.local/share/nvim/lazy/NvChad/lua/nvchad/autocmds.lua:7: Invalid buffer id: 1                                                                                                                             
stack traceback:                                                                                                                                                                                                                              
        [C]: in function 'nvim_buf_get_name'                                                                                                                                                                                                  
        ...en/.local/share/nvim/lazy/NvChad/lua/nvchad/autocmds.lua:7: in function <...en/.local/share/nvim/lazy/NvChad/lua/nvchad/autocmds.lua:6>

but cursor positioning is alright after error message is dismissed.

While the traceback is raised not within your plugin, it is the root cause for it.
Just guessing: maybe buffer id should be 0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions