Apply gofmt
This commit is contained in:
parent
d67c8a60ef
commit
6728a11fdf
6 changed files with 17 additions and 17 deletions
|
@ -3,9 +3,9 @@ package ui
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/mattn/go-runewidth"
|
||||
"github.com/gdamore/tcell"
|
||||
"github.com/gdamore/tcell/views"
|
||||
"github.com/mattn/go-runewidth"
|
||||
)
|
||||
|
||||
// A context allows you to draw in a sub-region of the terminal
|
||||
|
@ -40,10 +40,10 @@ func NewContext(width, height int, screen tcell.Screen) *Context {
|
|||
|
||||
func (ctx *Context) Subcontext(x, y, width, height int) *Context {
|
||||
vp_width, vp_height := ctx.viewport.Size()
|
||||
if (x < 0 || y < 0) {
|
||||
if x < 0 || y < 0 {
|
||||
panic(fmt.Errorf("Attempted to create context with negative offset"))
|
||||
}
|
||||
if (x + width > vp_width || y + height > vp_height) {
|
||||
if x+width > vp_width || y+height > vp_height {
|
||||
panic(fmt.Errorf("Attempted to create context larger than parent"))
|
||||
}
|
||||
vp := views.NewViewPort(ctx.viewport, x, y, width, height)
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package ui
|
||||
|
||||
import (
|
||||
"github.com/mattn/go-runewidth"
|
||||
"github.com/gdamore/tcell"
|
||||
"github.com/mattn/go-runewidth"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package widgets
|
||||
|
||||
import (
|
||||
"github.com/mattn/go-runewidth"
|
||||
"github.com/gdamore/tcell"
|
||||
"github.com/mattn/go-runewidth"
|
||||
|
||||
"git.sr.ht/~sircmpwn/aerc2/lib/ui"
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue