Ran go fmt to clean up formating issues

This commit is contained in:
sloumdrone 2019-05-28 19:02:46 -07:00
parent 63df316b96
commit 55d163ce5b
3 changed files with 9 additions and 10 deletions

View File

@ -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")
}

View File

@ -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

View File

@ -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() {