Skip to content

spurious closed channel errors when killing the game buffer #12

@seandewar

Description

@seandewar

May (rarely) get errors like E900: Invalid channel id if a scheduled event that writes to the terminal channel happens while killing the game buffer.

Presumably it's because the terminal is closed before buf_freeall autocommands (see close_buffer in Nvim), which should've :close()'d the game instance before that point. Actually, not what's happening here, as the event is being invoked via the main loop; still that scenario might be possible if there's another autocommand that processes non-fast events before ours...

In a perfect world, the terminal would only be freed after we're sure the buffer is going to be deleted (after buf_freeall autocommands), so it's a bit of an Nvim L, but might be nice to workaround that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions