From 9e1affdc6c574c0a3e44c509a515d757933c9bae Mon Sep 17 00:00:00 2001 From: raul Date: Tue, 7 May 2024 09:49:34 +0200 Subject: [PATCH] Occupy rest of terminal space After realizing what I'd have to go through to build a functional "Users online:" view, I have decided to NOT do that, especially because this entire thing still runs on raw TCP messages for commmunication and trying to tell apart regular messages from join/disconnect messages in the client to properly update the possible new view would be hell. --- cmd/clientFunc.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/clientFunc.go b/cmd/clientFunc.go index ddd8388..f8d2de8 100644 --- a/cmd/clientFunc.go +++ b/cmd/clientFunc.go @@ -210,7 +210,7 @@ func initKeybindings(g *gocui.Gui) error { func layout(g *gocui.Gui) error { maxX, maxY := g.Size() - if chatbox, err := g.SetView("chatbox", 2, 1, maxX-28, maxY-5); err != nil { + if chatbox, err := g.SetView("chatbox", 2, 1, maxX-2, maxY-5); err != nil { if err != gocui.ErrUnknownView { return err } @@ -228,7 +228,7 @@ func layout(g *gocui.Gui) error { // fmt.Fprintln(button, "Send it") // } - if textarea, err := g.SetView("textarea", 2, maxY-4, maxX-28, maxY-2); err != nil { + if textarea, err := g.SetView("textarea", 2, maxY-4, maxX-2, maxY-2); err != nil { if err != gocui.ErrUnknownView { return err }