Skip to content
This repository was archived by the owner on Apr 1, 2020. It is now read-only.
This repository was archived by the owner on Apr 1, 2020. It is now read-only.

Some event handlers with specific file patterns don't get triggered #2250

Open
@numirias

Description

@numirias

Oni Version: 0.3.4
Neovim Version (Linux only): 0.2.2
Operating System: 4.16.10-1-ARCH x86_64 GNU/Linux

Describe your issue

I'm developing a Python plugin for Neovim which does some initialization on VimEnter/BufEnter when editing Python files. However, the event handlers don't get triggered inside Oni when they are limited to a file pattern.

Expected behaviour

The event handlers for VimEnter, GUIEnter and BufEnter should be triggered when Oni starts up with e.g.:

$ oni existing_file.py

Actual behaviour

None of the events seems to get raised.

Steps to reproduce

Take this sample plugin:

import neovim

@neovim.plugin
class Plugin:

    def __init__(self, nvim):
        self.nvim = nvim

    @neovim.autocmd('BufEnter', pattern='*.py')
    def event_buf_enter(self):
        self.nvim.err_write('BufEnter triggered!\n')

Install the plugin and start Oni with a file argument:

$ oni existing_file.py

The event handler will not be triggered unless you change the pattern argument to *.

(Reference ticket: numirias/semshi/issues/10)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions