mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Remove extraneous app.Draw() calls by having app.Draw() in its own routine
This commit is contained in:
@@ -150,9 +150,7 @@ func (tracker *FocusTracker) focus(idx int) {
|
||||
|
||||
view := widget.TextView()
|
||||
view.SetBorderColor(ColorFor(Config.UString("wtf.colors.border.focused", "gray")))
|
||||
|
||||
tracker.App.SetFocus(view)
|
||||
tracker.App.Draw()
|
||||
}
|
||||
|
||||
func (tracker *FocusTracker) focusables() []Wtfable {
|
||||
|
||||
@@ -33,5 +33,4 @@ func (widget *HelpfulWidget) ShowHelp() {
|
||||
|
||||
widget.pages.AddPage("help", modal, false, true)
|
||||
widget.app.SetFocus(modal)
|
||||
widget.app.Draw()
|
||||
}
|
||||
|
||||
@@ -45,10 +45,6 @@ func NewTextWidget(app *tview.Application, commonSettings *cfg.Common, focusable
|
||||
|
||||
widget.View = widget.addView()
|
||||
|
||||
widget.View.SetChangedFunc(func() {
|
||||
app.Draw()
|
||||
})
|
||||
|
||||
return widget
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user