fixing deadloop when input is filtered

This commit is contained in:
ChenYe 2022-07-15 20:48:48 +08:00
parent 8e4bd417b9
commit 7f93d88cd5
2 changed files with 5 additions and 3 deletions

View File

@ -109,10 +109,12 @@ func (o *Operation) ioloop() {
keepInSearchMode := false
keepInCompleteMode := false
r := o.t.ReadRune()
if o.GetConfig().FuncFilterInputRune != nil {
var process bool
r, process = o.GetConfig().FuncFilterInputRune(r)
if !process {
o.t.KickRead()
o.buf.Refresh(nil) // to refresh the line
continue // ignore this rune
}