diff --git a/cui/window.go b/cui/window.go index f2f459f..9ab01bf 100644 --- a/cui/window.go +++ b/cui/window.go @@ -21,7 +21,7 @@ type Window struct { drawBox bool Active bool Show bool - tempContentLen int + tempContentLen int } func (w *Window) DrawWindow() { @@ -66,10 +66,10 @@ func (w *Window) DrawContent() { width := w.Box.Col2 - w.Box.Col1 + borderThickness content := wrapLines(w.Content, width) - w.tempContentLen = len(content) + w.tempContentLen = len(content) if w.Scrollposition > w.tempContentLen-height { - w.Scrollposition = w.tempContentLen-height + w.Scrollposition = w.tempContentLen - height if w.Scrollposition < 0 { w.Scrollposition = 0 } @@ -134,7 +134,7 @@ func (w *Window) PageDown() { if w.Scrollposition < w.tempContentLen-height { w.Scrollposition += height if w.Scrollposition > w.tempContentLen-height { - w.Scrollposition = w.tempContentLen-height + w.Scrollposition = w.tempContentLen - height } } else { fmt.Print("\a") @@ -180,7 +180,7 @@ func (w *Window) ScrollEnd() { height := w.Box.Row2 - w.Box.Row1 + borderThickness if w.Scrollposition < w.tempContentLen-height { - w.Scrollposition = w.tempContentLen-height + w.Scrollposition = w.tempContentLen - height } else { fmt.Print("\a") } diff --git a/gopher/url.go b/gopher/url.go index df65386..cb80f2a 100644 --- a/gopher/url.go +++ b/gopher/url.go @@ -83,7 +83,6 @@ func MakeUrl(u string) (Url, error) { out.IsBinary = true } - out.Full = out.Scheme + "://" + out.Host + ":" + out.Port + "/" + out.Gophertype + out.Resource return out, nil diff --git a/main.go b/main.go index 0568e69..dd6fe5f 100644 --- a/main.go +++ b/main.go @@ -456,9 +456,9 @@ func initClient() error { } func handleResize() { - oldh, oldw := screen.Height, screen.Width - screen.GetSize() - if screen.Height != oldh || screen.Width != oldw { + oldh, oldw := screen.Height, screen.Width + screen.GetSize() + if screen.Height != oldh || screen.Width != oldw { screen.Windows[0].Box.Row2 = screen.Height - 2 screen.Windows[0].Box.Col2 = screen.Width bookmarksWidth := 40 @@ -471,7 +471,7 @@ func handleResize() { screen.DrawAllWindows() screen.DrawMsgBars() - } + } } func main() {