diff --git a/cmd/clientFunc.go b/cmd/clientFunc.go index 91fa534..1da0934 100644 --- a/cmd/clientFunc.go +++ b/cmd/clientFunc.go @@ -84,7 +84,7 @@ func Client() { //////////////////////////////////////////////////// func listenMessages(g *gocui.Gui) { - time.Sleep(time.Millisecond * 250) + time.Sleep(time.Millisecond * 50) chatbox, err := g.View("chatbox") if err != nil { log.Panicln(err) @@ -92,7 +92,7 @@ func listenMessages(g *gocui.Gui) { for { messageFromServer, err := receiveMessage(data.Server) if err != nil { - // Avoid triggering an error if client quits the client + // What the hell is this if err == gocui.ErrQuit { g.Close() } else { @@ -254,6 +254,7 @@ func layout(g *gocui.Gui) error { if err != gocui.ErrUnknownView { return err } + chatbox.Autoscroll = true chatbox.Title = "Chat Box (Find source at https://git.bulgariu.xyz/raul/mini-chat!)" }