diff --git a/gocui-practice/main.go b/gocui-practice/main.go index 38d450d..423f0b3 100644 --- a/gocui-practice/main.go +++ b/gocui-practice/main.go @@ -22,6 +22,7 @@ func main() { go counter() g.Mouse = true + g.Cursor = true if err := g.SetKeybinding("", gocui.KeyCtrlC, gocui.ModNone, quit); err != nil { log.Panicln(err) @@ -59,9 +60,13 @@ func layout(g *gocui.Gui) error { if err != gocui.ErrUnknownView { return err } - for i := 0; i < 5; i++ { - fmt.Fprintln(v, "Hola!") + if _, err := g.SetCurrentView("anotherone"); err != nil { + return err } + v.Title = "Editing" + v.Editable = true + v.Wrap = true + fmt.Fprintln(v, "Holaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa!") } if v, err := g.SetView("WOW", maxX/2-20, maxY/2, maxX/2+20, maxY/2+5); err != nil {