Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions data/micro.json
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,11 @@
"type": "boolean",
"default": true
},
"tabalwaysshow": {
"description": "Wether to show the tab bar, even if only one tab exists\nhttps://github.com/zyedidia/micro/blob/master/runtime/help/options.md#options",
"type": "boolean",
"default": false
},
"tabsize": {
"description": "A tab size\nhttps://github.com/zyedidia/micro/blob/master/runtime/help/options.md#options",
"type": "integer",
Expand Down
6 changes: 4 additions & 2 deletions internal/action/tab.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ func (t *TabList) Resize() {
w, h := screen.Screen.Size()
iOffset := config.GetInfoBarOffset()
InfoBar.Resize(w, h-1)
if len(t.List) > 1 {
globalTabAlwaysShow := config.GetGlobalOption("tabalwaysshow").(bool)
if len(t.List) > 1 || globalTabAlwaysShow {
for _, p := range t.List {
p.Y = 1
p.Node.Resize(w, h-1-iOffset)
Expand Down Expand Up @@ -144,7 +145,8 @@ func (t *TabList) HandleEvent(event tcell.Event) {
// Display updates the names and then displays the tab bar
func (t *TabList) Display() {
t.UpdateNames()
if len(t.List) > 1 {
globalTabAlwaysShow := config.GetGlobalOption("tabalwaysshow").(bool)
if len(t.List) > 1 || globalTabAlwaysShow {
t.TabWindow.Display()
}
}
Expand Down
1 change: 1 addition & 0 deletions internal/config/settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ var DefaultGlobalOnlySettings = map[string]any{
"sucmd": "sudo",
"tabhighlight": false,
"tabreverse": true,
"tabalwaysshow": false,
"xterm": false,
}

Expand Down
1 change: 1 addition & 0 deletions runtime/help/options.md
Original file line number Diff line number Diff line change
Expand Up @@ -619,6 +619,7 @@ so that you can see what the formatting should look like.
"tabhighlight": true,
"tabmovement": false,
"tabreverse": false,
"tabalwaysshow": false,
"tabsize": 4,
"tabstospaces": false,
"useprimary": true,
Expand Down