Skip to content

Add create_menu API to support always making the menu #10

@trevorm4

Description

@trevorm4

I think it would be desirable to refactor toggle_menu to call an api named create_menu_if_missing or something similar and then expose that API to the user. The main use case for this would be to add an Autocmd that always creates the bento menu if its not open.

Currently, toggle_menu does

function M.toggle_menu(force_create)
    M.setup_state()

    if is_tabline_ui() then
        if tabline_active then
            M.close_menu()
            return
        end
...

which prevents including it in an Autocmd because on even number buffers it would close the bar instead of opening it.

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