diff options
author | Moritz Poldrack <git@moritz.sh> | 2022-07-31 22:16:40 +0200 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2022-08-01 10:44:52 +0200 |
commit | aaf0a0c65673db4b94c0dc200d7394a192128da1 (patch) | |
tree | 44940936efff55b49a6d359d053f55c7ab824e4d /widgets/terminal.go | |
parent | 21dcd440f877192af128c00ca2acbabf68bb3ee3 (diff) | |
download | aerc-aaf0a0c65673db4b94c0dc200d7394a192128da1.tar.gz |
lint: apply new formatting rules
Run `make fmt`.
Signed-off-by: Moritz Poldrack <git@moritz.sh>
Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'widgets/terminal.go')
-rw-r--r-- | widgets/terminal.go | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/widgets/terminal.go b/widgets/terminal.go index e499e3e4..962b02e8 100644 --- a/widgets/terminal.go +++ b/widgets/terminal.go @@ -82,8 +82,7 @@ func init() { keyMap[tcell.KeyPgUp] = directKey(vterm.KeyPageUp) keyMap[tcell.KeyPgDn] = directKey(vterm.KeyPageDown) for i := 0; i < 64; i++ { - keyMap[tcell.Key(int(tcell.KeyF1)+i)] = - directKey(vterm.Key(int(vterm.KeyFunction0) + i + 1)) + keyMap[tcell.Key(int(tcell.KeyF1)+i)] = directKey(vterm.Key(int(vterm.KeyFunction0) + i + 1)) } keyMap[tcell.KeyTAB] = directKey(vterm.KeyTab) keyMap[tcell.KeyESC] = directKey(vterm.KeyEscape) @@ -302,7 +301,6 @@ func (term *Terminal) Draw(ctx *ui.Context) { term.damageMutex.Lock() for _, rect := range term.damage { for x := rect.StartCol(); x < rect.EndCol() && x < ctx.Width(); x += 1 { - for y := rect.StartRow(); y < rect.EndRow() && y < ctx.Height(); y += 1 { coords := coords{x, y} @@ -472,8 +470,8 @@ func (term *Terminal) onDamage(rect *vterm.Rect) int { } func (term *Terminal) onMoveCursor(old *vterm.Pos, - pos *vterm.Pos, visible bool) int { - + pos *vterm.Pos, visible bool, +) int { rows, cols, _ := pty.Getsize(term.pty) if pos.Row() >= rows || pos.Col() >= cols { return 1 |