Skip to content

Add tabalways option to always show tab bar#4120

Open
artnc wants to merge 4 commits into
micro-editor:masterfrom
artnc:patch-1
Open

Add tabalways option to always show tab bar#4120
artnc wants to merge 4 commits into
micro-editor:masterfrom
artnc:patch-1

Conversation

@artnc

@artnc artnc commented Jun 7, 2026

Copy link
Copy Markdown

This PR fixes #4017 and picks up where #3882 left off, which @dmaluka supported.

cc @dmaluka @1ynxy @dave-foxglove @JoeKar

micro

Comment thread internal/action/tab.go
Comment thread runtime/help/options.md
Comment on lines +465 to +468
* `tabalways`: always shows the tab bar, even when only one tab is open.

default value: `false`

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As is so often the case with new options, micro.json is overlooked.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated! FWIW, I left it alone because @dmaluka said "we don't care about keeping it up to date". I'm inclined to agree and would lean toward deleting it altogether, but that's beyond the scope of this PR.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since it is often forgotten (from us too) or simply ignored and it breaks with single point of truth/failure I'm inclined to drop it as well.

Comment thread internal/action/tab.go Outdated
func NewTabList(bufs []*buffer.Buffer) *TabList {
w, h := screen.Screen.Size()
iOffset := config.GetInfoBarOffset()
numBufs := len(bufs)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this actually improves anything. The length of a slice is not "calculated" every time len(bufs) is called, it is internally stored as a part of the slice data structure by Go runtime.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've reverted that commit (fyi @JoeKar)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Option to always show tab bar, even with a single file

3 participants