File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -81,6 +81,11 @@ func main() {
8181 if app .itemIdx > 0 {
8282 app .itemIdx --
8383 }
84+ listView , err := g .View ("list" )
85+ if err != nil {
86+ return err
87+ }
88+ listView .FocusPoint (0 , app .itemIdx )
8489 return nil
8590 }); err != nil {
8691 log .Panicln (err )
@@ -324,9 +329,6 @@ func (app *App) layout(g *gocui.Gui) error {
324329 return err
325330 }
326331 }
327- if err := listView .SetCursor (0 , app .itemIdx ); err != nil {
328- return err
329- }
330332
331333 descriptionView , err := g .SetViewBeneath ("description" , "list" , descriptionViewHeight )
332334 if err != nil {
@@ -371,6 +373,12 @@ func (app *App) layout(g *gocui.Gui) error {
371373 if app .itemIdx < len (app .tests )- 1 {
372374 app .itemIdx ++
373375 }
376+
377+ listView , err := g .View ("list" )
378+ if err != nil {
379+ return err
380+ }
381+ listView .FocusPoint (0 , app .itemIdx )
374382 return nil
375383 }); err != nil {
376384 log .Panicln (err )
You can’t perform that action at this time.
0 commit comments