Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[Question] Lua API Tab Handling #3881

Copy link
Copy link
@1ynxy

Description

@1ynxy
Issue body actions

I'm a little confused by what functions appear to be exposed to handle Tabs-

Firstly, the only way of creating a tab via Lua, that I have found, is the BufPane:AddTab function, which is strange because a Tab contains BufPanes (as far as I understand), and not the other way around. A more global micro.CreateTab function might be more helpful- especially if you could micro.CreateTabWithBuffer (which would insert a specific Buffer into the first BufPane in a new Tab). I'm not entirely sure who owns NewTabFromBuffer and NewTabFromPane, or if they're at all accessible in Lua.

Additionally the only function I have found for switching Tabs is the BufPane:TabSwitchCmd, but this specifically takes []string types, not Lua.LString types, so I'm guessing this is a mis-wrapped Go function- I confess I don't have full knowledge of the Go binding workings.

When switching panes, the only functions I have found to work are the BufPane:NextSplit and BufPane:PreviousSplit functions, as the BufPane:SetActive function doesn't appear to do anything at all.

And finally, the BufPane:ResizePane function is.. strange. If I VSplitIndex on the left, and resize the returned BufPane, it will resize the left-hand pane, but if I VSplitIndex on the right and resize the returned BufPane, it will resize the.. left-hand pane again?

I apologise if these are dumb questions, or I've mistaken behaviour at all.

Profpatsch

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

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.