func getLine(g *gocui.Gui, v *gocui.View) error { var l string var err error _, cy := v.Cursor() if l, err = v.Line(cy); err != nil { l = "" } maxX, maxY := g.Size() if v, err := g.SetView("msg", maxX/2-30, maxY/2, maxX/2+30, maxY/2+2); err != nil { if err != gocui.ErrorUnkView { return err } fmt.Fprintln(v, l) if err := g.SetCurrentView("msg"); err != nil { return err } } if v, err := g.View("main"); err != nil { if err != gocui.ErrorUnkView { return err } f := proj.GetFile(l) if f != nil { v.Clear() fmt.Fprintf(v, "%s", f.GetBody()) } v.Editable = true v.Wrap = true } return nil }
func renderHelp(v *gocui.View, refresh bool) { v.Wrap = true v.Autoscroll = false Help.draw(v, refresh) }
func renderStack(v *gocui.View, refresh bool) { v.Wrap = true v.Autoscroll = false Stack.draw(v, refresh) }
func renderVm(v *gocui.View, refresh bool) { v.Wrap = true v.Autoscroll = false VM.draw(v, refresh) }
func renderSource(v *gocui.View, refresh bool) { v.Wrap = true v.Autoscroll = false Source.draw(v, refresh) }
func renderOutput(v *gocui.View, refresh bool) { v.Wrap = true Output.draw(v, refresh) }
func renderLog(v *gocui.View, refresh bool) { v.Wrap = true Log.draw(v, refresh) }