mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Allow people to substitute a title for cmdrunner
This falls back to existing logic otherwise
This commit is contained in:
parent
c6ab669edf
commit
cff4c061b2
@ -36,7 +36,10 @@ func NewWidget(app *tview.Application, settings *Settings) *Widget {
|
|||||||
func (widget *Widget) Refresh() {
|
func (widget *Widget) Refresh() {
|
||||||
result := widget.execute()
|
result := widget.execute()
|
||||||
|
|
||||||
ansiTitle := tview.TranslateANSI(widget.String())
|
ansiTitle := tview.TranslateANSI(widget.CommonSettings.Title)
|
||||||
|
if ansiTitle == defaultTitle {
|
||||||
|
ansiTitle = tview.TranslateANSI(widget.String())
|
||||||
|
}
|
||||||
ansiResult := tview.TranslateANSI(result)
|
ansiResult := tview.TranslateANSI(result)
|
||||||
|
|
||||||
widget.Redraw(ansiTitle, ansiResult, false)
|
widget.Redraw(ansiTitle, ansiResult, false)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user