Skip to content

ResizePane() resizes first/the most left pane #3046

@dustdfg

Description

@dustdfg

Description of the problem or steps to reproduce

I want a sidebar (from the right side) so what I do:

  1. Create buffer
  2. Create split index from the buffer
  3. Use ResizePane function on freshly created pane of sidebar
local sidebar_buf = buffer.NewBuffer("", "sidebar")

-- true here means to create it from right
sidebar =  bp:VSplitIndex(sidebar_buf, true)

sidebar:ResizePane(35)

What I expect:

Sidebar shrinks to size 35.

What I get:

The opened file that is on the left side shrinks to size 35

After getting something wrong I decided to try another thing. I decided to create sidebar on the left side and see what I will get. When I created the sidebar on the left side and tried to change it is size, I saw that this time it worked as expected. The sidebar shrink but I think it is only because it was on the left side and the function has a bug. It doesn't actually resize pane from which it was called. It just resizes the most left pane

Specifications

Commit hash: Version: 2.0.11 (it doesn't show commit hash)
OS: Debian 12
Terminal: foot

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