aboutsummaryrefslogtreecommitdiffstats
path: root/termui
diff options
context:
space:
mode:
authorLuke Adams <lukeclydeadams@gmail.com>2018-10-04 13:38:42 -0600
committerLuke Adams <lukeclydeadams@gmail.com>2018-10-04 13:51:00 -0600
commit98f27e9e7ce8d4e4b434851ded3d8161f0711a02 (patch)
tree1d1aeecde73e335e83c28e478782c30ad04ff0d1 /termui
parentda1af3458402449cbdfc3cdf0319c890196ccf1a (diff)
downloadgit-bug-98f27e9e7ce8d4e4b434851ded3d8161f0711a02.tar.gz
Make labelSelect update after add
Diffstat (limited to 'termui')
-rw-r--r--termui/label_select.go18
1 files changed, 9 insertions, 9 deletions
diff --git a/termui/label_select.go b/termui/label_select.go
index 5ab1f53d..dbf47aa1 100644
--- a/termui/label_select.go
+++ b/termui/label_select.go
@@ -179,6 +179,10 @@ func (ls *labelSelect) addItem(g *gocui.Gui, v *gocui.View) error {
if input == label.String() {
ls.labelSelect[i] = true
ls.selected = i
+
+ g.Update(func(gui *gocui.Gui) error {
+ return nil
+ })
return
}
}
@@ -187,6 +191,10 @@ func (ls *labelSelect) addItem(g *gocui.Gui, v *gocui.View) error {
ls.labels = append(ls.labels, bug.Label(input))
ls.labelSelect = append(ls.labelSelect, true)
ls.selected = len(ls.labels) - 1
+
+ g.Update(func(gui *gocui.Gui) error {
+ return nil
+ })
}()
return nil
}
@@ -234,12 +242,4 @@ func (ls *labelSelect) saveAndReturn(g *gocui.Gui, v *gocui.View) error {
}
return ui.activateWindow(ui.showBug)
-}
-
-// func (ls *labelSelect) Activate(labels []bug.Label, sel []bool) <-chan []bug.Label {
-// ls.labels = labels
-// ls.labelSelect = sel
-// ls.selected = 0
-// ls.c = make(chan []bug.Label)
-// return ls.c
-// } \ No newline at end of file
+} \ No newline at end of file