Skip to content

onBufPaneOpen is called when bufpane is not fully initialized yet #1800

@dmaluka

Description

@dmaluka

Description of the problem or steps to reproduce

There is no way to find out the geometry of a newly created bufpane in onBufPaneOpen lua callback: bp:GetView() returns {0,0,0,0} instead of the actual window. The reason is that the bufpane's view is not properly initialized yet when the bufpane is created and the callback is triggered. It is initialized a bit later, at the initial resize.

In addition, bp:ID() returns 0 instead of the actual bufpane's id. The reason is that SetID is called only after onBufPaneOpen is triggered.

A quick ugly hacky fix: dmaluka@e2c6680
It postpones triggering onBufPaneOpen until after the initial resize.

Specifications

Commit hash: 95ec55f
OS: any
Terminal: any

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