Пример #1
0
func scrollView(v *gocui.View, dy int) error {
	if v != nil {
		v.Autoscroll = false
		ox, oy := v.Origin()
		if err := v.SetOrigin(ox, oy+dy); err != nil {
			return err
		}
	}
	return nil
}
Пример #2
0
func FocusStatusView(g *gocui.Gui, v *gocui.View) error {

	v.Autoscroll = true

	if _, err := g.SetCurrentView(client.StatusChannel); err != nil {
		return err
	}

	return nil
}
Пример #3
0
func renderHelp(v *gocui.View, refresh bool) {
	v.Wrap = true
	v.Autoscroll = false
	Help.draw(v, refresh)
}
Пример #4
0
func renderStack(v *gocui.View, refresh bool) {
	v.Wrap = true
	v.Autoscroll = false
	Stack.draw(v, refresh)
}
Пример #5
0
func renderVm(v *gocui.View, refresh bool) {
	v.Wrap = true
	v.Autoscroll = false
	VM.draw(v, refresh)
}
Пример #6
0
func renderSource(v *gocui.View, refresh bool) {
	v.Wrap = true
	v.Autoscroll = false
	Source.draw(v, refresh)
}
Пример #7
0
func autoscroll(g *gocui.Gui, v *gocui.View) error {
	v.Autoscroll = true
	return nil
}