summaryrefslogtreecommitdiff
path: root/redo/controls.go
diff options
context:
space:
mode:
Diffstat (limited to 'redo/controls.go')
-rw-r--r--redo/controls.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/redo/controls.go b/redo/controls.go
index bc4f823..b40256a 100644
--- a/redo/controls.go
+++ b/redo/controls.go
@@ -32,6 +32,7 @@ func NewButton(text string) *Request {
// Example:
// b := ui.GetNewButton(ui.Do, "OK")
func GetNewButton(c Doer, text string) Button {
- c <- newButton(text)
- return (<-c.resp).(Button)
+ req := newButton(text)
+ c <- req
+ return (<-req.resp).(Button)
}