Skip to content

Commit bcd877c

Browse files
committed
fix: Pasting 32 or more runes is broken (fixes #852)
This make posting events blocking, but it also increases the size of the event queue to 256, so we hopefully avoid blocking mostly.
1 parent 34853e2 commit bcd877c

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

input.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,7 @@ func (ip *inputProcessor) post(ev Event) {
111111
}
112112
}
113113

114-
// this tries to post, will drop events that overflow
115-
select {
116-
case ip.evch <- ev:
117-
default:
118-
}
114+
ip.evch <- ev
119115
}
120116

121117
func (ip *inputProcessor) escTimeout() {

tscreen.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ func (t *tScreen) Init() error {
230230
}
231231

232232
t.quit = make(chan struct{})
233-
t.eventQ = make(chan Event, 32)
233+
t.eventQ = make(chan Event, 256)
234234
t.input = NewInputProcessor(t.eventQ)
235235

236236
t.Lock()

0 commit comments

Comments
 (0)