diff options
Diffstat (limited to 'lib/ui')
-rw-r--r-- | lib/ui/tab.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/ui/tab.go b/lib/ui/tab.go index d4841efc..d336d646 100644 --- a/lib/ui/tab.go +++ b/lib/ui/tab.go @@ -30,6 +30,11 @@ type Tab struct { pinned bool indexBeforePin int uiConf *config.UIConfig + title string +} + +func (t *Tab) SetTitle(s string) { + t.title = s } type ( @@ -351,6 +356,9 @@ func (strip *TabStrip) Draw(ctx *Context) { tabWidth = ctx.Width() - x - 2 } name := tab.Name + if tab.title != "" { + name = tab.title + } if tab.pinned { name = uiConfig.PinnedTabMarker + name } |