1
0
mirror of https://github.com/gdamore/tcell.git synced 2025-04-27 13:48:50 +08:00

all: gofmt

Run standard gofmt command on project root.

- go version go1.10.3 darwin/amd64

Signed-off-by: ia <isaac.ardis@gmail.com>
This commit is contained in:
ia 2018-06-17 00:44:25 +02:00 committed by Garrett D'Amore
parent 2efc922424
commit de7e78efa4
2 changed files with 16 additions and 16 deletions

View File

@ -17,25 +17,25 @@
package tcell package tcell
import ( import (
"errors"
"sync" "sync"
"syscall" "syscall"
"unicode/utf16" "unicode/utf16"
"unsafe" "unsafe"
"errors"
) )
type cScreen struct { type cScreen struct {
in syscall.Handle in syscall.Handle
out syscall.Handle out syscall.Handle
cancelflag syscall.Handle cancelflag syscall.Handle
scandone chan struct{} scandone chan struct{}
evch chan Event evch chan Event
quit chan struct{} quit chan struct{}
curx int curx int
cury int cury int
style Style style Style
clear bool clear bool
fini bool fini bool
w int w int
h int h int
@ -117,7 +117,7 @@ var (
) )
const ( const (
w32Infinite = ^uintptr(0) w32Infinite = ^uintptr(0)
w32WaitObject0 = uintptr(0) w32WaitObject0 = uintptr(0)
) )
@ -530,7 +530,7 @@ func (s *cScreen) getConsoleInput() error {
uintptr(pWaitObjects), uintptr(pWaitObjects),
uintptr(0), uintptr(0),
w32Infinite) w32Infinite)
// WaitForMultipleObjects returns WAIT_OBJECT_0 + the index. // WaitForMultipleObjects returns WAIT_OBJECT_0 + the index.
switch rv { switch rv {
case w32WaitObject0: // s.cancelFlag case w32WaitObject0: // s.cancelFlag
return errors.New("cancelled") return errors.New("cancelled")

View File

@ -385,8 +385,8 @@ outer:
func (t *tScreen) Fini() { func (t *tScreen) Fini() {
t.Lock() t.Lock()
defer t.Unlock() defer t.Unlock()
ti := t.ti ti := t.ti
t.cells.Resize(0, 0) t.cells.Resize(0, 0)
t.TPuts(ti.ShowCursor) t.TPuts(ti.ShowCursor)
t.TPuts(ti.AttrOff) t.TPuts(ti.AttrOff)
@ -405,7 +405,7 @@ func (t *tScreen) Fini() {
default: default:
close(t.quit) close(t.quit)
} }
t.termioFini() t.termioFini()
} }