mirror of https://github.com/gdamore/tcell.git
allocate buffer once, outside the key loop
This commit is contained in:
parent
8ec73b6fa6
commit
1b5e88726b
|
@ -1351,9 +1351,9 @@ func (t *tScreen) mainLoop() {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (t *tScreen) inputLoop() {
|
func (t *tScreen) inputLoop() {
|
||||||
|
chunk := make([]byte, 128)
|
||||||
|
|
||||||
for {
|
for {
|
||||||
chunk := make([]byte, 128)
|
|
||||||
n, e := t.in.Read(chunk)
|
n, e := t.in.Read(chunk)
|
||||||
switch e {
|
switch e {
|
||||||
case io.EOF:
|
case io.EOF:
|
||||||
|
|
Loading…
Reference in New Issue