mirror of
https://github.com/junegunn/fzf.git
synced 2025-08-12 10:45:48 -07:00
Fix typo in code
This commit is contained in:
@@ -183,7 +183,7 @@ func (m *Matcher) scan(request MatchRequest, limit int) (*Merger, bool) {
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
if !empty && m.reqBox.Peak(reqReset) {
|
if !empty && m.reqBox.Peek(reqReset) {
|
||||||
return nil, wait()
|
return nil, wait()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -14,7 +14,7 @@ func TestReadFromCommand(t *testing.T) {
|
|||||||
eventBox: eb}
|
eventBox: eb}
|
||||||
|
|
||||||
// Check EventBox
|
// Check EventBox
|
||||||
if eb.Peak(EvtReadNew) {
|
if eb.Peek(EvtReadNew) {
|
||||||
t.Error("EvtReadNew should not be set yet")
|
t.Error("EvtReadNew should not be set yet")
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -25,7 +25,7 @@ func TestReadFromCommand(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check EventBox again
|
// Check EventBox again
|
||||||
if !eb.Peak(EvtReadNew) {
|
if !eb.Peek(EvtReadNew) {
|
||||||
t.Error("EvtReadNew should be set yet")
|
t.Error("EvtReadNew should be set yet")
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -38,7 +38,7 @@ func TestReadFromCommand(t *testing.T) {
|
|||||||
})
|
})
|
||||||
|
|
||||||
// EventBox is cleared
|
// EventBox is cleared
|
||||||
if eb.Peak(EvtReadNew) {
|
if eb.Peek(EvtReadNew) {
|
||||||
t.Error("EvtReadNew should not be set yet")
|
t.Error("EvtReadNew should not be set yet")
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -50,7 +50,7 @@ func TestReadFromCommand(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check EventBox again
|
// Check EventBox again
|
||||||
if eb.Peak(EvtReadNew) {
|
if eb.Peek(EvtReadNew) {
|
||||||
t.Error("Command failed. EvtReadNew should be set")
|
t.Error("Command failed. EvtReadNew should be set")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -53,8 +53,8 @@ func (events *Events) Clear() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Peak peaks at the event box if the given event is set
|
// Peek peeks at the event box if the given event is set
|
||||||
func (b *EventBox) Peak(event EventType) bool {
|
func (b *EventBox) Peek(event EventType) bool {
|
||||||
b.cond.L.Lock()
|
b.cond.L.Lock()
|
||||||
defer b.cond.L.Unlock()
|
defer b.cond.L.Unlock()
|
||||||
_, ok := b.events[event]
|
_, ok := b.events[event]
|
||||||
|
Reference in New Issue
Block a user