forked from sloum/bombadillo
Ran go fmt to clean up formating issues
This commit is contained in:
parent
63df316b96
commit
55d163ce5b
|
@ -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")
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
8
main.go
8
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() {
|
||||
|
|
Loading…
Reference in New Issue