-
Notifications
You must be signed in to change notification settings - Fork 1.3k
add a global option to always show the tab bar #3882
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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) | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: a separate variable doesn't seem useful here, we can just do Same for |
||
| if len(t.List) > 1 || globalTabAlwaysShow { | ||
| for _, p := range t.List { | ||
| p.Y = 1 | ||
| p.Node.Resize(w, h-1-iOffset) | ||
|
|
@@ -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() | ||
| } | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -130,6 +130,7 @@ var DefaultGlobalOnlySettings = map[string]any{ | |
| "sucmd": "sudo", | ||
| "tabhighlight": false, | ||
| "tabreverse": true, | ||
| "tabalwaysshow": false, | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please keep alphabetical order. |
||
| "xterm": false, | ||
| } | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -619,6 +619,7 @@ so that you can see what the formatting should look like. | |
| "tabhighlight": true, | ||
| "tabmovement": false, | ||
| "tabreverse": false, | ||
| "tabalwaysshow": false, | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please keep alphabetical order. |
||
| "tabsize": 4, | ||
| "tabstospaces": false, | ||
| "useprimary": true, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/Wether/Whether/ ?
But more importantly, please document this in
runtime/help/options.md.As for this
data/micro.json, I'm not even sure what it is for... Ok, just looked it up: it is some strange thing introduced in #2697 "to add intellisence for micro config", whatever that means. Basically we don't care about keeping it up to date.