zyedidia / micro

A modern and intuitive terminal-based text editor

Home Page:https://micro-editor.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to open a new tab in from plugin?

Mrdhaaw opened this issue · comments

I can't use tabs:AddTab(tab) because i can't create a new tab object
i tried using micro.NewTabFromBuffer(mybuffer) to create new tab but its not defined

ty

You can create a new tab via bp:AddTab(). It makes the newly created tab active, so you can refer to it via micro.CurTab(). If you don't want the new tab to become active, you should be able to activate back the previously active tab via tabs:SetActive(). A bit kludgy but works.

Thank You